Re: [css3-page] Margin boxes: replacing 6.3.2 Variable Dimension Computation Rules

Le 11/06/2012 23:44, Simon Sapin a écrit :
> I think that − as currently spec’ed − 6.3.2 is unreasonably hard to
> implement, under-specified and not even sufficient for the desired
> behavior. I would like to get consensus that it needs to be re-written.
>
> If we can establish that a replacement is needed, I have a proposal
> below that we can discuss.


Please find attached a revised version of my proposal. You can also find 
the latest version[1] or the change history[2].

[1] 
https://github.com/SimonSapin/css/blob/master/margin-boxes-variable-dimension
[2] 
https://github.com/SimonSapin/css/commits/master/margin-boxes-variable-dimension


Aside from obvious bug fixes, this new revision includes a more 
substantial change:


The general idea of the proposed algorithm is as follows:

* If the sum of the preferred widths is small enough for the containing 
block, use that
* If the sum of the preferred minimum widths is too big, use that
* Otherwise, do something proportional to the amount of content.

For the proportional distribution, the algorithm used to take the 
preferred widths as weights. The problem is that this ignored the 
contraints of minimum widths.

In the new algorithm, each box always gets at least its preferred 
mininmum width. In the third case, only the remaining space is 
distributed. The weights are the preferred width minus the preferred 
mininum width.

This new algorithm as better continuity while still always keeping the 
minimum constraints.

Please share any comment or feedback.

Regards,
-- 
Simon Sapin

Received on Monday, 2 July 2012 16:23:27 UTC