Implement visibility:collapse for flex items
- Category
- CSS
- Type
- New or changed feature
- Status
- Proposed (Chrome Proposed)
- Intent stage
- None
Summary
Implement the CSS Flexbox visibility-collapse algorithm for flex items. Collapsed flex items should have zero main-axis size during line collection while preserving line cross-size contribution as a strut, per spec. CL: https://chromium-review.googlesource.com/c/chromium/src/+/7675197 sampler: https://static.januschka.com/i-41085247/
Motivation
interoperable support for visibility:collapse on flex items, as defined by the CSS Flexbox specification. Blink currently treats visibility:collapse like visibility:hidden for flex items, which is not spec compliant. As a result, developers rely on workarounds such as extra wrapper elements, script-driven layout changes, or alternate styles that are harder to maintain and do not reproduce the specified strut behavior. This change aligns Chrome with the standardized Flexbox algorithm, reduces cross-browser layout differences, and allows authors to rely on a consistent CSS behavior without custom workarounds. CL: https://chromium-review.googlesource.com/c/chromium/src/+/7675197 sampler: https://static.januschka.com/i-41085247/
Standards & signals
- Specification: https://drafts.csswg.org/css-flexbox/#algo-visibility
- Firefox: No signal
- Safari: No signal
- Web developers: No signals
- Tracking bug: https://issues.chromium.org/issues/41085247
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=implement-visibility-collapse-for-flex-items
- 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+Implement%20visibility%3Acollapse%20for%20flex%20items
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=Implement%20visibility%3Acollapse%20for%20flex%20items
- Baseline status: https://webstatus.dev/?q=Implement%20visibility%3Acollapse%20for%20flex%20items
Explainers: https://static.januschka.com/i-41085247