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

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

From: Alex Mogilevsky <alexmog@microsoft.com>
Date: Tue, 8 May 2012 23:16:59 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>
CC: fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <2C86A15F63CD734EB1D846A0BA4E0FC81A3F0E7B@CH1PRD0310MB381.namprd03.prod.outlook.com>
± 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

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