Article
My Favourite 3 Lines of CSS
Andy Bell
Read on andy-bell.co.uk
(opens in a new tab)
2 highlights ·
Feb 2023
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
.flowgives us two benefits:
- There’s a sensible fallback for if
--flow-spaceis accidentally set as an invalid value- If
--flow-spacedoesn’t exist, themargin-top-valuewill be1em, which will be relative to the element’s computed font size
