Intent to Prototype: Support visibility:collapse on flex items

42 views
Skip to first unread message

Chromestatus

unread,
5:12 PM (6 hours ago) 5:12 PM
to blin...@chromium.org, cg...@chromium.org
Contact emails
cg...@chromium.org

Specification
https://www.w3.org/TR/css-flexbox-1/#algo-visibility

Summary
Support visibility:collapse on flex items

Blink component
Blink>CSS

Web Feature ID
visibility

Motivation
The CSS Flexible Box Layout specification defines visibility: collapse for flex items: a collapsed item is removed from layout much like display: none, but the cross size of its flex line is preserved by treating the item's line cross size as a "strut." This lets developers toggle items in and out of a flex layout without the row or column resizing, avoiding visual jumps as content appears and disappears. Chromium does not implement this behavior and instead treats visibility: collapse on flex items the same as visibility: hidden, leaving the item's box in place. Firefox already supports the spec-defined behavior, so the feature is not interoperable across engines and developers cannot rely on it. To work around this, web authors fall back to manually toggling display: none and managing their own layout to prevent reflow, or they avoid visibility: collapse entirely. This adds complexity and is a common source of confusion, since the property appears in the spec but produces engine-specific results. Implementing visibility: collapse on flex items brings Chromium in line with the Flexbox specification and matches the behavior already shipping in Firefox, improving interoperability and giving developers a reliable, declarative way to collapse flex items while keeping line sizing stable.

Initial public proposal
No information provided

Goals for experimentation
None

Requires code in //chrome?
False

Tracking bug
https://issues.chromium.org/u/2/issues/41085247

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5184249629114368?gate=6480562530418688

This intent message was generated by Chrome Platform Status.
Reply all
Reply to author
Forward
0 new messages