W3C home > Mailing lists > Public > www-style@w3.org > January 2014

layout collapsibility

From: Rossen Atanassov <Rossen.Atanassov@microsoft.com>
Date: Mon, 27 Jan 2014 23:03:00 +0000
To: "www-style@w3.org" <www-style@w3.org>
Message-ID: <c73485204e7c4e2b83dc7ec382e62a02@BN1PR03MB187.namprd03.prod.outlook.com>
Collapsibility is one these useful layout features that we exposed in tables and now we're trying to do it for flex and grid. The usual way it's used is by crafting selectors that when matched define visibility: collapse etc.

Another usage pattern of collapsibility is based on layout. One pattern I've noticed is when authors layout elements off-screen and then apply collapsing to elements based on the used style. My hope is that we can come up with a way that would enable layout to handle collapsibility automatically. To do that we can introduce a min-width-collapse, min-height-collapse properties. The property would trigger collapsing if the width or height available for the element's box during layout is less than the used value of the property.

min-width-collapse: <length> | <percentage> | inherit
min-height-collapse: <length> | <percentage> | inherit

For the purposes of shrink-to-fit the new definition would most likely imply the following change to preferred minimum and preferred width:

* preferred minimum width = (min-content >= min-width-collapse) ? min-content : 0
* preferred width = (max-content >= min-width-collapse) ? max-content : 0

With the above change the shrink-to-fit width should still be computable as defined in CSS 2.1 or the CSS 3 sizing spec.
min(max(preferred minimum width, available width), preferred width)

We'll have to deal with ordering of collapsing which by default could be document order.

Thanks,
Rossen
Received on Monday, 27 January 2014 23:03:31 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:39 UTC