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 11:01:27 +0200
Message-ID: <CAAWBYDAoSwfADN1o4p94V+2hX+oZCEWsymMfLia_gfxqOW7+=A@mail.gmail.com>
To: Alex Mogilevsky <alexmog@microsoft.com>
Cc: "www-style@w3.org" <www-style@w3.org>
On Tue, May 8, 2012 at 10:46 AM, Alex Mogilevsky <alexmog@microsoft.com> wrote:
> You are suggesting that flexbox could become 100px wide in the same situation. Do we want that?
> I am not sure. What if flex-pack is 'justify'? Do we still want it to be 100px, or do we want 50px between items?
> I think I would keep doing it same as text. I haven't seen many cases in real life where shrink-to-max-line would really make a difference. But I could live with the other option too, and maybe even get convinced it is better.

I doubt we would want it to do that.  It just got brought up when we
were fixing up the algorithm.  I think I implicitly required that
behavior at some point (but I don't think anyone actually did it).

> There is a related issue of max-height...
> Consider this:
> <div id="F" style="display:flex; flex-flow:column wrap; max-height:150px">
>        <div id="A" style="height:100px"></div>
>        <div id="B" style="height:100px"></div>
> </div>
> Flexbox doesn’t have a height, either specified or otherwise inferred. When processed as a block, it is given available width and infinite height.
> If lines wrap into max-height (as in spec), "F" will be 100px tall.
> If height is calculated as min(content height, max-width), as will happen if parent layout is also a vertical flexbox, "F" will be 150px tall.

The spec determines the main size of the flexbox before doing
line-wrapping, so the flexbox will be 150px high.  (It tries to be
200px, but is limited by the max-height.)  Right?  I know that
line-wrapping has no effect on main-size determination right now.


> Would be good to make these consistent... Watch out for perf though, a choice of 100px may require yet another layout pass.
> Alex
Received on Tuesday, 8 May 2012 09:02:19 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:58 UTC