Skip to main content
Full Stack Radio

134: Mark Dalgleish - You Should Be Using Layout Components

56 min episode · 2 min read
·

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.

Know someone who'd find this useful?

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 — Free

Keep Reading

More from Full Stack Radio

We summarize every new episode. Want them in your inbox?

Similar Episodes

Related episodes from other podcasts

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 Digest

No credit card · Unsubscribe anytime