Re: [css3-flexbox] ED updated: algorithms and 'flex' property

On Tue, Feb 28, 2012 at 6:58 PM, Alex Mogilevsky <alexmog@microsoft.com>wrote:

> ± From: Daniel Holbert [mailto:dholbert@mozilla.com]
> ±
> ± I like the sound of this too -- one thing though.  It sounds like with
> ± your proposed semantics, the 50px here would be ignored:
> ±
> ±   <div style="display: flexbox">
> ±     <div style="flex: 0 0 50px"/>
> ±   </div>
> ±
> ± That seems undesirable.
>

I agree that this is undesirable, but I am a bit skeptical it will happen
that much in practice.  It's hard to say without developer feedback.


> I think the current syntax is a very reasonable compromise:
>
>        * When flex is not specified - no flexibility and
>          width/height work as usual
>        * When flex is specified, default "preferred size" is zero,
>          overriding width/height
>        * "flex:1 100px; width:200px;" makes width ignored, not perfect,
>          but is clear enough since there are two values and one must win
>        * "flex:1 auto" (no width/height) means
>          "calculate natural size, then flex"
>

 Wouldn't something like 'flex: 1 derived' be more clear?


>        * "flex:1 auto; width:50%;" is the only case that can lead
>          to confusion. But if you think about it as 'width' property
>          providing additional info for calculating "natural size",
>          it makes perfect sense.
>

'flex: 1 derived; width: 50%' also seems more clear than using auto here.

Received on Wednesday, 29 February 2012 18:11:52 UTC