Re: Use of "inherit"

On Tuesday 2005-11-01 18:12 +0000, Ian Hickson wrote:
> On Tue, 1 Nov 2005, Patrick Wright wrote:
> > 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.)

With one exception, which is that <number> and 'normal' values for
'line-height' are inherited the way percentage margins are, since that's
much more useful inheritance behavior for 'line-height'.

-David

-- 
L. David Baron                                <URL: http://dbaron.org/ >
           Technical Lead, Layout & CSS, Mozilla Corporation

Received on Tuesday, 1 November 2005 18:26:47 UTC