W3C home > Mailing lists > Public > www-style@w3.org > June 2012

RE: [css3-flexbox] min-width & min-height "auto" value -- applies to both axes, or just main axis?

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>
Message-ID: <2C86A15F63CD734EB1D846A0BA4E0FC823CBD253@CH1PRD0310MB381.namprd03.prod.outlook.com>
 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 [...]
 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".

	* 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. 

Received on Tuesday, 12 June 2012 01:07:58 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:00 UTC