134: Mark Dalgleish - You Should Be Using Layout Components
Episode
56 min
Read time
2 min
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.
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
The Productivity Show
The Three Investments That Compound Like Crazy (TPS613W)
May 20
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 Compound and Friends
It’s a Wave Not a Bubble, Nvidia Preview, Google’s I/O Highlights, Investing in Space Stocks
May 20
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
The Productivity Show
May 20
The Three Investments That Compound Like Crazy (TPS613W)
The Compound and Friends
May 20
It’s a Wave Not a Bubble, Nvidia Preview, Google’s I/O Highlights, Investing in Space Stocks
Feel Better, Live More
May 19
The Simple Nutrient That Could Transform Your Gut Health, Brain Power & Longevity with Dr Emily Leeming #658
The Journal
May 19
Trapped in the Strait of Hormuz
The Long Run with Luke Timmerman
May 19
Ep201: Jeremy Levin on Biotech in the Balance
This podcast is featured in Best Cybersecurity Podcasts (2026) — ranked and reviewed with AI summaries.
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 up to 3 shows.
Start My Monday DigestNo credit card · Unsubscribe anytime