W3C home > Mailing lists > Public > www-style@w3.org > December 2015

RE: [css-flexbox] Intrinsic Cross Size Definition Totally Wrong

From: Greg Whitworth <gwhit@microsoft.com>
Date: Mon, 14 Dec 2015 18:31:21 +0000
To: Christian Biesinger <cbiesinger@google.com>, fantasai <fantasai.lists@inkedblade.net>, Ojan Vafai <ojan@google.com>
CC: www-style list <www-style@w3.org>
Message-ID: <CY1PR03MB1439C6C1F149D26BB8BEC57DA4ED0@CY1PR03MB1439.namprd03.prod.outlook.com>
>>> Side note: current browsers also set the *flex container’s* inner
>>> size to that largest value, which is clearly wrong, as it is
>>> guaranteed to cause overflow if there are multiple lines. We would
>>> need to require the cross-size to be the sum of the line’s cross
>>> sizes after doing item layout and linebreaking as outlined above.
>> Note: IE does the correct behavior, wrapping the flex container around
>> all of the columns. Edge preserves this behavior for max-content.
>> It would be nice if implementations can align on intrinsic sizes of
>> flex containers not causing their content to overflow. :) :) :)
>Right, I somehow didn't think about this correctly, totally missing the fact that
>the correct behavior requires doing layout in order to compute the preferred
>On behalf of Blink, I want to object to requiring any behavior that requires
>layout in order to calculate the preferred width of a container. So, I guess
>there's no good solution here :(

We continue to stand by[1] that the heuristics used by Gecko/Blink/Webkit in shrink-to-fit contexts are not intuitive for authors, this thread being a good example of this. Additionally, we continue to want other vendors to do the architectural work necessary to provide both a performant implementation without compromising a good solution. Here is a good example of this: http://jsfiddle.net/xzt063uv/2/ - just because I placed the content inside of a container that is shrink-to-fit; we believe it should not force the content to change how it lays out when there is enough space within the viewport to match the exact same layout in a non shrink-to-fit container.

To be blunt, if your solution to this is, "the flex container will shrink down around the first column or the first item", that is not something that we can get behind as that is not a viable solution and you're basically providing a broken flex implementation.


[1] http://logs.csswg.org/irc.w3.org/css/2014-10-27/#e484693

Received on Monday, 14 December 2015 18:31:51 UTC

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