134: Mark Dalgleish - You Should Be Using Layout Components
Episode
56 min
Read time
2 min
Topics
Design & UX, Software Development, Crypto & Web3
AI-Generated Summary
Key Takeaways
- ✓Text Baseline Alignment: Browser text naturally centers on line height, creating invisible space above and below characters. Use CSS transforms and negative margins to crop text nodes so they only occupy visual space, enabling predictable component spacing.
- ✓Layout Component Architecture: Separate all layout concerns into dedicated components like Stack, Inline, Tiles, and Columns. Remove margins and padding from leaf components entirely, allowing designers to compose interfaces by explicitly defining space between elements rather than around them.
- ✓Responsive Props Pattern: Implement array-based props that accept multiple values corresponding to breakpoint definitions, enabling developers to specify different spacing and column counts per screen size without writing media queries, matching how designers think about responsive behavior.
- ✓Space as First-Class Concept: Treat space between elements as a collection property, not individual gaps. A stack of cards should have one space value applied to the group, not separate spacers between each item, reducing maintenance and matching designer mental models.
What It Covers
Mark Dalgleish explains why components should have zero surrounding white space and advocates for dedicated layout components to handle spacing, improving design system maintainability and designer-developer collaboration in React applications.
Key Questions Answered
- •Text Baseline Alignment: Browser text naturally centers on line height, creating invisible space above and below characters. Use CSS transforms and negative margins to crop text nodes so they only occupy visual space, enabling predictable component spacing.
- •Layout Component Architecture: Separate all layout concerns into dedicated components like Stack, Inline, Tiles, and Columns. Remove margins and padding from leaf components entirely, allowing designers to compose interfaces by explicitly defining space between elements rather than around them.
- •Responsive Props Pattern: Implement array-based props that accept multiple values corresponding to breakpoint definitions, enabling developers to specify different spacing and column counts per screen size without writing media queries, matching how designers think about responsive behavior.
- •Space as First-Class Concept: Treat space between elements as a collection property, not individual gaps. A stack of cards should have one space value applied to the group, not separate spacers between each item, reducing maintenance and matching designer mental models.
Notable Moment
Dalgleish reveals that designers manually maintain equal spacing between grouped items without realizing they conceptually think in nested collections with inherited spacing values, not individual gaps, which fundamentally changed how his team approached layout component design.
Episode Transcript
In this episode of Fullstack Radio, I talked to Mark Dalglish about why your components should have no surrounding white space and why you should be using dedicated layout components to handle that problem instead. This is Fullstack Radio episode 134. So the reason that I wanted to have you on the show is you on Twitter are super opinionated when it comes to how people kind of put together their, you know, design systems. Whether or not that's a dirty word is a whole other conversation, and just like their sort of component libraries in general and how people are actually piecing together user interfaces. And it sounds like you've, gone through, you know, a lot of your own pain over the years in trying to get this right and, design things in a way that, you know, is maintainable and scalable and, easy to work with and also lets you sort of translate sort of the way that your designers are thinking about UI, as accurately to code as possible, which I I definitely think is a problem that people run into a lot. So I think maybe the best place to start, would be just talking a little bit about, like, some of the challenges that you've run into yourself when it comes to building, sort of component systems and dealing with layout, I think especially is a is a hot topic that I'm curious to get into. Yeah. I mean, so I like a lot of people are getting into design systems. And as as you said, that's a whole big can of worms, even just the term. You know, at at at the basic level, I think the reason it's become so popular popular is that technology choices that people are making are driving them in this direction the biggest one I think being React that's influenced a lot of people, where if you do React well you basically are building a component library that leads towards the idea of a design system. Yeah. And so I, you know, so I was on that journey fairly early on, I got onto React quite early, and, and I think what happens is people naturally start building up the most obvious kind of leaf nodes, you know, buttons and text fields and even, you know, text components and headings and things like that, but what happens I think is that people run into this problem where and this is definitely what happened to us is that as soon as you start trying to compose up larger parts of the UI you feel like it's a lot less obvious what you're supposed to do, you know a button's very easy but you know how do I construct a page? And in practice because we didn't really have a good answer you would just kind of fall back on CSS more or less and just start relative to the the components that you were building, it felt like you …
Get the full transcript (11,105 words) + summary by email — free
One-time email with the complete transcript and AI summary of this episode. No account needed.
One email, no spam. We’ll also show you what SignalCast does.
You just read a 3-minute summary of a 53-minute episode.
Get Full Stack Radio summarized like this every Monday — plus up to 2 more podcasts, free.
Pick Your Podcasts — FreeKeep Reading
More from Full Stack Radio
153: DHH – Omarchy and Designing Your Own OS on Arch Linux
Aug 21 · 76 min
Odd Lots
Jeremy Grantham on How to Tell If a Bubble Is About to Burst
Jun 18
More from Full Stack Radio
152: Ben Orenstein - How to Stand Out When Applying for a Job at a Small Company
Jan 28 · 47 min
The AI Breakdown
Harness Engineering 101
Apr 13
More from Full Stack Radio
We summarize every new episode. Want them in your inbox?
153: DHH – Omarchy and Designing Your Own OS on Arch Linux
152: Ben Orenstein - How to Stand Out When Applying for a Job at a Small Company
151: DHH – Building HEY with Hotwire
150: Secret Screencasting Tips & Behind the Scenes of Tailwind CSS 2.0
149: Choosing a Payment Processor, Radical Icons & W3C Hype
Similar Episodes
Related episodes from other podcasts
Odd Lots
Jun 18
Jeremy Grantham on How to Tell If a Bubble Is About to Burst
The AI Breakdown
Apr 13
Harness Engineering 101
a16z Podcast
Feb 26
When Giants Don’t Go Public: Inside the $5 Trillion Private Tech Market
Latent Space
Feb 24
Claude Code for Finance + The Global Memory Shortage: Doug O'Laughlin, SemiAnalysis
Invest Like the Best with Patrick O'Shaughnessy
Feb 24
Dan Sundheim - The Art of Public and Private Market Investing - [Invest Like the Best, EP.460]
Explore Related Topics
This podcast is featured in Best Cybersecurity Podcasts (2026) — ranked and reviewed with AI summaries.
Read this week's Software Engineering Podcast Insights — cross-podcast analysis updated weekly.
You're clearly into Full Stack Radio.
Every Monday, we deliver AI summaries of the latest episodes from Full Stack Radio and 192+ other podcasts. Free for one show.
Start My Monday DigestNo credit card · Unsubscribe anytime