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

Re: [css3-flexbox] flex-basis initial value should be 0px

From: Anton Prowse <prowse@moonhenge.net>
Date: Tue, 22 May 2012 22:15:29 +0200
Message-ID: <4FBBF3E1.4010304@moonhenge.net>
To: www-style@w3.org
CC: Ojan Vafai <ojan@chromium.org>
On 22/05/2012 01:08, Ojan Vafai wrote:
> I think this was probably an oversight in the recent changes to the spec,
> but at some point, the default value of flex-basis changed from 0px to auto.
> "flex:<positive-number>
> Equivalent to flex:<positive-number>  1 0px. This value makes the flex
> item flexible, and sets the flex basisto zero, resulting in an item that
> receives the specified proportion of the free space in the flex container.
> If all items in the flex container use this pattern, their sizes will be
> proportional to the specified flex ratio."
> That seems like the correct default behavior. Having auto as the preferred
> size is considerably slower and often not what the developer wants. It
> should not be the default value.

By "default value", do you mean initial value?  If so, I interpret your 
concern as being that if you create a flexbox but don't specify any 
flex-* properties, you get flex: 1 1 auto.  (I'm not entirely sure I've 
understood you, to be honest!)

I'm interested to understand how the fact that one value is slower than 
another is a valid concern in deciding what to define as the initial 
value of a property.  It seems to me that the author wants whatever 
behaviour they want; if the initial value of a property doesn't meet 
their needs in a given situation then they'll explicitly specify 
something else.  It's not like they'll just say "well, that rendering 
will do, I guess" and stick with the "default" out of laziness.  (At 
least, not in my experience!  Authors tend to be pretty exacting.)

Anton Prowse
Received on Tuesday, 22 May 2012 20:16:23 UTC

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