Andrew's Digital Garden

Flow containers

Don't set margins on individual typography elements for vertical rhythm. You will constantly be overwriting and removing them in different use cases.

Instead, handle the spacing using a container component, which allows you to customise the spacing and only applies when you want it to.

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

https://24ways.org/2018/managing-flow-and-rhythm-with-css-custom-properties/

[[20200314214239-layout-components]]

[[css]] [[layout]]

Flow containers