CSS block-step-size
- Category
- CSS
- Type
- New or changed feature
- Status
- Proposed (Chrome Proposed)
- Intent stage
- None
Summary
The CSS block-step-size property rounds a block-level box's outer block-size up to a multiple of a step unit, so vertical rhythm survives content changes. A box with a step establishes an independent formatting context; a block-level replaced child is re-centered via block-axis margins so its outer size is also a multiple. CL: https://chromium-review.googlesource.com/c/chromium/src/+/8843502
Motivation
Designers have asked for a reliable vertical-rhythm primitive since the property was proposed in 2016. Current workarounds are fixed heights or JS measurement, both of which break on content/font/language changes. block-step-size is the minimum shippable slice of CSS Rhythmic Sizing: the single longhand solves the "keep a block on a baseline grid" use case without the three siblings, which are more contested in the CSSWG.
Standards & signals
- Firefox: Closed Without a Position
- Safari: N/A
- Web developers: Positive — requests since 2016
- Tracking bug: https://issues.chromium.org/issues/589684500
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=css-block-step-size
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+CSS%20block-step-size
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=CSS%20block-step-size
- Baseline status: https://webstatus.dev/?q=CSS%20block-step-size
Samples: https://static.januschka.com/i-589684500 https://drafts.csswg.org/css-rhythm-1/#block-step-size