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

New proposal:
Have the initial value of flex be none or noflex.  none/noflex means 0
positive flex, 0 negative flex, and use the value of width or height for
sizing.  Also, drop the special meaning of auto for the preferred size.
 Which is to say, if you specify a flex value at all, then width/height
will be ignored.

This feels more explicit to me and avoids having auto for a length value
have a different meaning.

On Thu, Feb 16, 2012 at 9:14 PM, Alex Mogilevsky <alexmog@microsoft.com>wrote:

> ± From: tc@google.com [mailto:tc@google.com] On Behalf Of Tony Chang
> ± Sent: Thursday, February 16, 2012 12:10 PM
> ±
> ± Why is the initial value of flex 'none'?  Why can't it be '0 0 auto' or
> 'auto'?
>
> It certainly could be "0 0 auto". The problem I have with that is that
> usually when you have a set of default values and change one, the others
> still have defaults.
>
> This looks weird to me:
>
>        "flex:initial"  == "0 0 auto"
>        "flex:1"                == "1 0 0px"
>        "flex:0px"              == "1 0 0px"
>        "flex:auto"             == "1 0 auto"
>
> It seems that a property is getting one value set, but it is also applying
> different defaults.
>
> When default is "none" or any other special keyword rather than a string
> of multiple defaults, it is clear (I hope) that it is applied by different
> rules.
>
> Perhaps instead of 'none' it could be called 'noflex' ?
>
> BTW these special values wouldn't be problematic if 'flex' property
> behaved like most others - omitted values that are same as default. Then
> the default would be "0 0 auto" ant to change any default you have to set
> it. That would be my preference too.
>
> ± I find the use of 'auto' for preferred size meaning the value of width or
> ± height confusing.  Can we name it something else?
>
> Maybe. Have better ideas? 'box'?
>

Received on Wednesday, 22 February 2012 00:19:29 UTC