W3C home > Mailing lists > Public > www-style@w3.org > November 2005

Re: Use of "inherit"

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 1 Nov 2005 18:12:11 +0000 (UTC)
To: Patrick Wright <pdoubleya@gmail.com>
Cc: www-style@w3.org
Message-ID: <Pine.LNX.4.62.0511011800460.9929@dhalsim.dreamhost.com>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:41 GMT