- From: Alex Mogilevsky <alexmog@microsoft.com>
- Date: Tue, 12 Jun 2012 01:07:21 +0000
- To: Daniel Holbert <dholbert@mozilla.com>, Tab Atkins Jr. <jackalmage@gmail.com>, fantasai <fantasai@inkedblade.net>
- CC: www-style list <www-style@w3.org>
± From: Daniel Holbert [mailto:dholbert@mozilla.com] ± Sent: Monday, June 11, 2012 2:41 PM ± ± Right now, section 4.4 "Implied Minimum Size of Flex Items" on the flexbox ED says: ± ± # Name: min-width, min-height ± [...] ± # auto ± # On a flex item, this keyword indicates ± # a minimum size of the min-content size. ± # It is intended that this will compute ± # to the 'min-content' keyword [...] ± http://dev.w3.org/csswg/css3-flexbox/#min-size-auto ± ± This doesn't make any distinction about the orientation of our flexbox. ± (horizontal vs. vertical) ± ± So right now, the spec is calling for all flexbox items to have *both* their min- ± width *and* their min-height default to "min-content". ± ± I'd thought we only wanted this magic for the main axis's min-size property, not ± for both min-size properties. Maybe I misunderstood though? We want the magic in both direction, but "min-content" is the correct magic only when content main-size does not depend on cross size, e.g. when child is a block with inline direction same as flex main axis (and a few other conditions on content). Or when flex cross size is STF. The actual magic that we want is "minimum size of content when laid out within constraints of cross size of flexbox". Examples: * cross-size undefined Min-content (min-width or height at max-width, as appropriate) * flex horizontal, child horizontal text Min-width (usualy) * flex vertical, child horizontal text or horizontal multiline flex Height when width = flex width less child MBP. * flex horizontal, child vertical text or vertical multiline flex Width when child height = flex height less child MBP Note that when there are no mixed flow directions, row and column direction flex may seem to work differently. When mixed directions are accounted for, sizing has to work the same. Symmetry galore. Alex
Received on Tuesday, 12 June 2012 01:07:58 UTC