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

Re: [css-flexbox] How should scrollbars affect flex item sizing?

From: Christian Biesinger <cbiesinger@google.com>
Date: Thu, 14 Apr 2016 13:39:27 -0400
Message-ID: <CAPTJ0XFx_8g4RXKQtWZD+95+3LJAkXNW8PpjOVDN5Q3XXYaZfg@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: fantasai <fantasai.lists@inkedblade.net>, www-style list <www-style@w3.org>
On Thu, Apr 14, 2016 at 12:41 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> On Wed, Apr 13, 2016 at 1:46 PM, Christian Biesinger
> <cbiesinger@google.com> wrote:
>> On Wed, Apr 6, 2016 at 8:03 PM, fantasai <fantasai.lists@inkedblade.net> wrote:
>>> On 04/06/2016 06:45 PM, Christian Biesinger wrote:
>>>> - If, after flexing, a scrollbar becomes necessary or is no longer
>>>> necessary I assume that this won't affect the outer size of the flex
>>>> item and will just lead to a bigger/smaller content size of the item?
>>>
>>> It might affect the outer size of the flex item, if layout
>>> without the scroll bar results in a different intrinsic
>>> size, and the element is laid out at that size.
>>
>> Are you saying that the size of the flex item changes *after* the flx
>> algorithm runs?!
>
> Unfortunately, that's how non-overlay scrollbars work everywhere else
> in the platform.
>
> Scrollbars are a garbage fire.

Oh, you're saying flexing sets the *content* size of a box, not the
border-box size? That's in contradiction to the spec:
https://drafts.csswg.org/css-flexbox/#resolve-flexible-lengths: "Set
each item’s used main size to its target main size."
https://drafts.csswg.org/css-flexbox/#main-size: "A flex item’s width
or height, whichever is in the main dimension, is the item’s main
size. The flex item’smain size property is either the width or height
property, whichever is in the main dimension."

And the width or height property otherwise includes the scrollbar size.

-Christian
Received on Thursday, 14 April 2016 17:40:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:02 UTC