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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 14 Apr 2016 10:58:05 -0700
Message-ID: <CAAWBYDDvJOkq7XdE_pYzD1h2T6USYuV4M2tRz2FEL4JhcmhpMA@mail.gmail.com>
To: Christian Biesinger <cbiesinger@google.com>
Cc: fantasai <fantasai.lists@inkedblade.net>, www-style list <www-style@w3.org>
On Thu, Apr 14, 2016 at 10:39 AM, Christian Biesinger
<cbiesinger@google.com> wrote:
> 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.

Oh, sorry, I see the confusion now.

No, we're saying that if you do flex layout without the flex container
getting a scrollbar, and then realize you need one, you might shrink
the available space and have to redo the flex layout algorithm.

~TJ
Received on Thursday, 14 April 2016 17:58:55 UTC

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