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

Re: [css-flexbox] intrinsic size algorithm

From: fantasai <fantasai.lists@inkedblade.net>
Date: Fri, 15 May 2015 15:28:38 -0400
Message-ID: <555648E6.4010807@inkedblade.net>
To: www-style@w3.org
On 05/15/2015 12:32 AM, Christian Biesinger wrote:
> On Tue, May 12, 2015 at 1:47 PM, fantasai <fantasai.lists@inkedblade.net> wrote:
>> On 05/11/2015 12:14 AM, Christian Biesinger wrote:
>>> So Ojan and I were looking again at
>>> http://dev.w3.org/csswg/css-flexbox/#intrinsic-sizes
>>>
>>> What is the broader issue that this complex algorithm is trying to
>>> solve? In particular, why is it better than just summing up the flex
>>> bases (if definite) or the max-content contributions (otherwise)?
>>
>> Its goal is to preserve the flex ratios. E.g. if you have (using Ahem)
>>
>> <flexbox>
>>    <item flex:1>A A</item>
>>    <item flex:2>B B</item>
>> </flexbox>
>>
>> and ask it to shrinkwrap, you probably want A to lay out at 3em
>> and B to lay out at 6em.
>
> Actually I would expect A and B both to lay out at 3em. But... I can
> see why that wouldn't happen with the current algorithm.

If you wanted that, then you should have asked for flex: auto. :)

~fantasai
Received on Friday, 15 May 2015 19:29:07 UTC

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