RE: [css3-flexbox] min/max main-size of flexbox

± From: Tab Atkins Jr. [mailto:jackalmage@gmail.com] 
± Sent: Monday, May 07, 2012 10:53 PM
± 
± On Tue, May 8, 2012 at 6:16 AM, Alex Mogilevsky 
± <alexmog@microsoft.com> wrote:
± >
± > If parent layout is also a flexbox, it will need to know max-
± content without min/max-width/height constraints, of flex algorithm 
± will produce incorrect results.
± >
± > This step of the algorithm (step 4) needs to mention min/max, but 
± also note that parent layout must be able to suppress that.
± 
± No, because you *are* guaranteed, in the end, that no flexbox can be 
± larger than its max size, you can use that information when sizing 
± the flexbox itself.  Otherwise you can end up with a flexbox that is 
± larger than necessary, because all its items are constrained by a 
± max size.

This contradicts the requirement of flexbox algorithm that flex items provide their "preferred size" (using "preferred" here, as it is really what they would have been without any constraints) *before* min/max-width/height.

The case of flexbox being a flex item is an example of a case where specified min/max sometimes needs to be honored and sometimes ignored.

How to trigger each option is an implementation detail. DHolbert says it is easy in his code, I figured it out too, but it has to be done and should be noted in the spec.

Received on Tuesday, 8 May 2012 23:17:54 UTC