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

RE: [css3-flexbox] min/max need to be swapped in step 6 of "resolve the flexible lengths"

From: Alex Mogilevsky <alexmog@microsoft.com>
Date: Wed, 18 Apr 2012 05:45:11 +0000
To: Daniel Holbert <dholbert@mozilla.com>, www-style <www-style@w3.org>
CC: Tab Atkins Jr. <jackalmage@gmail.com>
Message-ID: <2C86A15F63CD734EB1D846A0BA4E0FC80E77F47D@CH1PRD0310MB381.namprd03.prod.outlook.com>
> From: Daniel Holbert [mailto:dholbert@mozilla.com]
> Sent: Tuesday, April 17, 2012 3:38 PM
> 
> Resurrecting this thread from a month ago -- I don't believe anyone has
> addressed this on the list. (and it looks like the ED hasn't changed to address
> this, either)
> 
> On 03/09/2012 12:26 PM, Daniel Holbert wrote:
> > Hi www-style,
> >
> > I think the current Flexbox Layout Algorithm has some words reversed
> > right now, in such a way that it'd never terminate if it were to be
> > implemented as-written.
> >
> > It currently says:
> > {{
> > 4. Distribute free space proportional to flex
> >   [...]
> > 5. Fix min/max violations:
> >     1. Adjust each flexible item for min/max.
> >     2. If the size has changed, it is a violation.
> >     3. The violation may be positive (min violation) or
> >        negative (max violation). Accumulate the difference.
> >
> > 6. If the sum of all violations is:
> >   Zero:     Exit the algorithm.
> >   Positive: Freeze items with max violations, and return to step 2.
> >   Negative: Freeze items with min violations, and return to step 2.
> > }}
> > http://dev.w3.org/csswg/css3-flexbox/#resolve-the-flexible-lengths
> >
> >
> > TL;DR; I think min/max are reversed in step 6 there.

I think you are right, it should say

	Positive: Freeze items with min violations, and return to step 2.
	Negative: Freeze items with max violations, and return to step 2.

The idea is that if all of the min/max adjustment add more space (negative total change in item size), we freeze the items that do add space (max vaiolations) and vice versa.

Alex
Received on Wednesday, 18 April 2012 05:46:10 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:52 GMT