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

> 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 UTC