W3C home > Mailing lists > Public > www-style@w3.org > February 2012

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

From: Tony Chang <tony@chromium.org>
Date: Wed, 29 Feb 2012 10:11:19 -0800
Message-ID: <CAL-=4P1yB0HrrBXYVVaTCp-mYzA6qdKhndkD8149YijTCMh27Q@mail.gmail.com>
To: Alex Mogilevsky <alexmog@microsoft.com>
Cc: Daniel Holbert <dholbert@mozilla.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, "www-style@w3.org list" <www-style@w3.org>
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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:56 UTC