[css-flexbox] Computation Algorithm

Looking on this document in Mozilla:
http://terrainformatica.com/w3/mozilla-flex-2.htm

I am getting this rendering: 
http://terrainformatica.com/w3/mozilla-flex-2.png

Two boxes here are defined as:

#box2 { box-flex: 1.0; width:200px; background:gold;}
#box3 { box-flex: 2.0; width:200px; background:red;}

According to the name of the property ("box-flex") 
I would expect that box3 (flex:2) and box2 (flex:1)
widths will be in proportion 2:1. 
At least box3 should be wider than box2. 
But in fact box3 is smaller! That is completely unexpected
as all other properties of these two elements are the same.

It appears that different values of the 'width' may change
meaning of 'box-flex'. Larger values of the flex may 
lead to larger widths - proportion A/B. But as we can see 
larger flexes may lead to smaller widths too - suddenly to change to B/A.

In any case box-flex multiplier appears as completely unpredictable 
when 'width's are expressed in percents.

Question to authors of the FlexBox proposal:
what is the motivation to use such an algorithm?

And yet: if someone would ask to define in one sentence (for dummies) 
meaning of such "box-flex" what would be that sentence? 
What does it mean/flex to be short?  

-- 
Andrew Fedoniouk

http://terrainformatica.com

Received on Tuesday, 11 May 2010 03:16:52 UTC