Re: [css-flexbox] intrinsic size algorithm

On 05/11/2015 12:14 AM, Christian Biesinger wrote:
> Hi there!
>
> 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.

Without this rule, the boxes would lay out at 2em and 4em, respectively,
causing the text in A to wrap even though there is plenty of space to
lay out at its max-content size.

> Maybe a note can be added explaining that?

Yeah, we can take that as an action item.

~fantasai

Received on Tuesday, 12 May 2015 03:47:46 UTC