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

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 UTC