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

Re: [css-flexbox] available space and max-height

From: Christian Biesinger <cbiesinger@google.com>
Date: Tue, 1 Dec 2015 20:01:47 -0500
Message-ID: <CAPTJ0XE5C97pHGzGKsWytoe7EA0mc8WStKyAkYmQmdGPxbFpMg@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: fantasai <fantasai.lists@inkedblade.net>, www-style list <www-style@w3.org>
On Tue, Dec 1, 2015 at 7:58 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> On Tue, Dec 1, 2015 at 4:49 PM, Christian Biesinger
> <cbiesinger@google.com> wrote:
>> On Tue, Dec 1, 2015 at 7:41 PM, fantasai <fantasai.lists@inkedblade.net> wrote:
>>> On 10/09/2015 12:21 PM, Christian Biesinger wrote:
>>>> Hi there!
>>>> I was looking at this testcase:
>>>> http://codepen.io/anon/pen/pJLwYp
>>>> Originally I was focused on the intrinsic width computation, but then
>>>> I actually realized that I can't find a spot in the flexbox spec that
>>>> says we should break lines at the max-height. It talks about the
>>>> available space, but its definition does not take max-height into
>>>> account.
>>>> Line breaking at max-height is interoperably implemented though. Did I
>>>> just miss the part of the spec where it defines that? :)
>>> This is handled in step 4 and 5
>>>   https://drafts.csswg.org/css-flexbox/#algo-main-container
>>> At this point we size the flex container (including honoring
>>> max-height, of course). And then *afterwards* we break lines:
>>>   https://drafts.csswg.org/css-flexbox/#algo-line-break
>> OK, that's reasonable, and explains how to do the layout.
>> However that still leaves the preferred width computation which only
>> says "Place all flex items into lines of infinite length.", which is
>> quite the opposite of respecting any height or max-height properties.
>> Shouldn't it be affected by that?
> No, "width: max-content;" never cares about the "max-width" property
> on the element.  (For the purpose of figuring out what "max-content"
> resolves to - later, in actual layout, it of course matters.)

No, that's not what I meant. This is still about how max-height should
affect the max-content width. See the testcase I gave originally -- if
a column flexbox has a max-height set, shouldn't the intrinsic width
computation break the boxes into multiple lines and give a width that
can fit the multiple flex rows (visually, the columns)?

Received on Wednesday, 2 December 2015 01:02:35 UTC

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