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

Re: [css3-flexbox] ussue 2 - fill-available vs. fit-content

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 8 May 2012 08:10:59 +0200
Message-ID: <CAAWBYDCqDPWG=5U21S_tS0ShFW2icyw+Ad61n+JAkJm-PmM8sQ@mail.gmail.com>
To: Alex Mogilevsky <alexmog@microsoft.com>
Cc: "www-style@w3.org" <www-style@w3.org>
On Tue, May 8, 2012 at 6:32 AM, Alex Mogilevsky <alexmog@microsoft.com> wrote:
> Issue 2 [1] says
> “Are flexboxes fill-available or fit-content by default? Or are they really
> shrink-wrap, such that we need to adjust the main size here, now that we
> know the length of the longest line”
> This shouldn’t be an issue. It is up to parent layout to decide if they want
> shrink-wrap, based on parent layout and display-outside.
> The current text seems to be specific enough for both single- and multi-line
> cases, I don’t a need for any additional adjustments.

You misunderstand (but the issue probably isn't clear enough anyway).

By "shrink-wrap" here, we mean "*really* shrink-wrap".  For example,
say that a float contains just two words, both 100px wide, and it's
put in a container that's 150px wide.  The formula is
"max(min-content, min(max-content, fill-available))", so in this case
that means "max(100px, min(200px, 150px))", which resolves to 150px.
This will cause the second word to wrap to a new line.  However, the
float *stays* 150px, even though it now only needs 100px total.

The question is, should Flexbox have the float's behavior, or should
it shrink to 100px in the same situation (assuming a multi-line row
flexbox with two items, both 100px wide).

That's the second sentence, though. For the first sentence in the
issue, you're right.  We handle 'auto' properly up in step 4 anyway
(where we just "use the main size property").

Received on Tuesday, 8 May 2012 06:11:49 UTC

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