Re: Proposal: content-vertical-alignment

Andrew Fedoniouk wrote:

>Formal definition of %% length units:
>When allotting space among element attributes competing for space along 
>axis, UA allot all values for attributes having other than %% lengths first, 
>then divide up remaining available space among %% lengths. Each %% length 
>receives a portion of the available free space that computed as a percentage 
>from total sum of all %% units along axis. If total sum of all %% lengths 
>along axis is less then 100 then 100%% value is used as a total sum of all 
>%% units. Thus, if 100 pixels of space are available after the user agent 
>allots pixel and percentage space, and the competing relative lengths are 
>10%%, 20%%, and 70%%, the 10%% will be alloted to 10 pixels, the 20%% will 
>be alloted 20 pixels, and the 70%% will be alloted 70 pixels. If 100 pixels 
>of space are available, and the competing relative lengths are 10%%, 20%%, 
>and 30%%, the 10%% will be alloted to 10 pixels, the 20%% will be alloted 20 
>pixels, the 30%% will be alloted 30 pixels, and remaining 40 pixels will be 
>left undistributed.
>
What if a block has a width of ‘auto’? That makes it have 100% (incl. 
borders and paddings) of the width. Will this cause the width to behave 
differently (e.g. use the minimum computed width instead?).

And you say this applies to all blocks in normal flow. Afaik, absolute 
positioned blocks and floats, for which this would be useful, are not 
part of normal flow, so that excludes those. That leaves statically 
positioned blocks, of type inline and block. Inline elements can’t have 
specific widths, so those are excluded as well. Thus we end up with 
block boxes. Block boxes however don’t stack horizontally (like e.g. 
floats do), so then what would the point be of having %% units?

If this does apply to absolutely positioned blocks (which is really the 
only use case I can see), then isn’t a calc() function (e.g. width: 
calc(100% - sum-of-all-known-widths)) a better solution which in 
addition applies more generically to length units used elsewhere?


~Grauw

-- 
Ushiko-san! Kimi wa doushite, Ushiko-san!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Laurens Holst, student, university of Utrecht, the Netherlands.
Website: www.grauw.nl. Backbase employee; www.backbase.com.

Received on Tuesday, 14 June 2005 18:53:29 UTC