Skip to content
Daniel Wentsch

Things read, heard, watched and found. Now and then a thought of my own.

Timeline
Article

My Favourite 3 Lines of CSS

Andy Bell

Read this post in Japanese. In Every Layout, we wrote about The Stack. It’s a marriage of Heydon’s Lobotomised Owl selector and my method of managing Flow and Rhythm with CSS Custom Properties. .st…

8 Feb 2023

.flow > * + * { margin-block-start: var(--flow-space, 1em); }

The fallback value for .flow gives us two benefits:

  1. There’s a sensible fallback for if --flow-space is accidentally set as an invalid value
  2. If --flow-space doesn’t exist, the margin-top-value will be 1em, which will be relative to the element’s computed font size