- From: fantasai <fantasai.lists@inkedblade.net>
- Date: Tue, 28 Jul 2015 16:21:50 -0400
- To: "www-style@w3.org" <www-style@w3.org>
The spec currently defines the max-content contribution of a flex item as its hypothetical base size. However, I don't think this works correctly for flexible items with a definite flex base size. In particular, notice # For each flex item, subtract its flex base size from its # max-content contribution size, This calculation will end up at zero for items with "flex: 1", when the intention was for it to tend up at the max-content size. Proposed definition: | The max-content main-size contribution of a flex item is: | * if the item is growable, max(max-content, flex base size) | * otherwise, its flex base size | clamped by its min and max main size properties. Together with the definition of the max-content size of flex containers [1], I think this will give the expected results (no unnecessary wrapping of shrinkwrapped flexboxes, no unnecessary or unrequested extra space). https://drafts.csswg.org/css-flexbox-1/#intrinsic-sizes However, we'd also want to change the expansion of 'flex: <integer>' from 'flex: <integer> 1 0%' to 'flex: <integer> 1 0'. (The 0% hack doesn't give very good results when there are multiple items anyway.) Thoughts? Corrections? Alterations? ~fantasai [Still trying to think through min-content contributions.]
Received on Tuesday, 28 July 2015 20:22:18 UTC