I've updated my proposal for flex units and the 'flow' in CSS:
http://www.terrainformatica.com/w3/flex-layout/flex-layout.htm
Just two additions:
1) "template" flow can use ordinals of child elements now. So if you have
this markup:
<li><p>A</p>
<p>B</p>
<p>C</p></li>
Then after defining in CSS the following:
li {
flow: "1 1"
"2 3";
}
content of each list item will have two rows with
first element (A) spanning whole first row and
with B,C elements in second row.
Pretty handy and self descriptive for simple cases when
there are just few children.
2) The Flex Algorithm.
The document contains link to the implementation of algorithm
used for computation of sets of flexible and non-flexible values.
It is in C++ but code is straightforward - core of the calc() function
is about 50 lines of code. The implementation is using only integer
arithmetic so pretty stable and can be used effectively on low-end
devices.
In fact this algorithm is used in many places in HTML/CSS even without
flex units per se, for example:
1) computation of 'auto' widths and margins in blocks,
2) tables - computation of column/rows distributions,
3) frameset layouts, etc.
At the moment the algorithm is BSD-licensed - please let me know if
this not permissive enough. I am not that good in "legaleze".
If any dev team designing rendering engines wants me to help with
integrating all this - please let me know I am open at the moment for
interesting offers.
--
Andrew Fedoniouk
Terra Informatica Software, Inc.
http://terrainformatica.com
mailto: andrew at terrainformatica.com