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

[css-flexbox] Computation Algorithm

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Mon, 10 May 2010 20:16:22 -0700
Message-ID: <E0EFF7B447CB49C1AE0B254008D29AD4@terra3>
To: <www-style@w3.org>
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 GMT

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