Re: Use of "inherit"

On Tue, 1 Nov 2005, Patrick Wright wrote:
>
> Two examples of the specification for computed value in the 
> specification:
> 
> line-height:
> "for <length> and <percentage> the absolute value; otherwise as specified"
> 
> margin-top:
> "the percentage as specified or the absolute length"
> 
> Our interpretation of this is that for line-height, "inherit" on a child 
> inherits the calculated (absolute) value from the parent; for 
> margin-top, "inherit" on a child inherits the % value (e.g. 25%), which 
> is then recalculated in the context of the child.
> 
> Is this correct? The closeness of the wording is throwing us off 
> somewhat.

Yes, it is correct. (The reason is that for line-height, you can calculate 
the absolute value without doing a layout phase, but for margins, you need 
to actually lay out the page, potentially measuring text and so forth, in 
order to get an absolute value.)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Tuesday, 1 November 2005 18:12:18 UTC