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

Ah, thanks for the clarification. Wasn't clear to me that fantasai's
comment was talking about the intrinsic size *of the container*.
Thanks!

-Christian

On Thu, Apr 14, 2016 at 1:58 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> 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 18:25:53 UTC