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

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

From: Anton Prowse <prowse@moonhenge.net>
Date: Mon, 23 Apr 2012 11:32:22 +0200
Message-ID: <4F9521A6.1020608@moonhenge.net>
To: "www-style@w3.org list" <www-style@w3.org>
CC: Alex Mogilevsky <alexmog@microsoft.com>, Daniel Holbert <dholbert@mozilla.com>, Tony Chang <tony@chromium.org>, "Tab Atkins Jr." <jackalmage@gmail.com>
On 29/02/2012 03:58, Alex Mogilevsky wrote:
>  From: Daniel Holbert [mailto:dholbert@mozilla.com]
>  Sent: Tuesday, February 28, 2012 5:59 PM
> 
>  On 02/28/2012 04:59 PM, Tony Chang wrote:
> >  I like this idea.  To expand on it further, we would have three
> >  separate properties (e.g., positive-flex, negative-flex,
> >  flex-preferred-size) and flex would just be a shorthand.  All would
> >  default to 0.  If we're not in a flexing context or if positive flex
> >  and negative flex are both 0, we would use width/height.  We only
>  use
> >  flex-preferred-size if we have a positive or negative flex value.
> 
>  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.
>
> That is exactly the problem with the meaning of "preferred size" with and without flex.
>
> Without flex, preferred size is the size, and it totally makes sense that 'width' and 'height' express the preference.
>
> With flex, preferred size is the starting point of flexing, often zero, but that zero is by no means the size the items prefer to get.

Perhaps the term "preferred size" is not optimal.  What about "initial 
size"? I accept, though, that there's potential for confusion with 
"initial value of the main/cross size property".  Still, 
'flex-initial-size' makes more sense to me than 'flex-preferred-size' 
since, as Alex says, 0px unlikely to be the size that the items prefer 
to get!

Cheers,
Anton Prowse
http://dev.moonhenge.net
Received on Monday, 23 April 2012 09:32:58 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:52 GMT