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

Re: [css3-flexbox] Updates to Resolving Flexible Sizes

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 30 Apr 2012 11:55:57 -0700
Message-ID: <CAAWBYDDTc8bdmw45XQTsTV+7wEA1F67GmwjE521zeB8BNYJ7Zw@mail.gmail.com>
To: Daniel Holbert <dholbert@mozilla.com>
Cc: fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>
On Wed, Apr 25, 2012 at 11:31 AM, Daniel Holbert <dholbert@mozilla.com> wrote:
> Three notes on the new "Resolving Flexible Lengths" text:
> ISSUE #1:
> # The total violation is the sum of the differences between each
> # violating element's original size and its adjusted size.
> The word "original" is ambiguous there -- it could be taken to mean
> either "the size before we flexed it" or "the size after we flexed it".
> I think we want it to mean the latter, so I suggest s/original/flexed/
> and perhaps also s/adjusted/clamped/.

Fixed.  We used the terms "clamped size" and "unclamped size", and
explicitly called back to the previous step.

> ISSUE #2:
> In that same chunk of text, I think "the difference" is backwards from
> what we want it to be, and this makes the min/max behavior incorrect at
> the moment.
> Right now, I read the above text to say:
>  Total Violation = Sum(OriginalFlexedSize - ClampedSize)
> So if "max-width" is the only constraint in play, then the Total
> Violation will be positive. (since ClampedSize is less than FlexedSize)
> But the "Positive" clause says "Freeze all the items with _min_
> violations" (of which there are none in this case), so we won't freeze
> anything, and we'll loop forever.
> I think we want to reverse the order of subtraction, like so:
>  Total Violation = Sum(ClampedSize - FlexedSize)
> (which is what it was in the previous spec-version)
> so that a max-width clamping will produce a _negative_ Total Violation,
> which will make us freeze items with max violations and produce sane
> behavior.

Nope, the math is right, but the prose is unclear.  I've replaced the
"difference between..." phrase with a bit of math so it's unambiguous.

> ISSUE #3:
> #  5. [...] If the total violation is:
> #   Zero
> #      If the free space is also zero[...]
> This might be clearer with s/free space is/free space was/, since "the
> free space" (from Step 2) has already been distributed at this point,
> which makes talking about it in the present tense a little confusing.

This is moot, since I've removed that phrase.

Received on Monday, 30 April 2012 18:56:47 UTC

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