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

Use of "inherit"

From: Patrick Wright <pdoubleya@gmail.com>
Date: Tue, 1 Nov 2005 17:34:44 +0100
Message-ID: <64efa1ba0511010834o2af99ea1xc74d1cb6a007f6c9@mail.gmail.com>
To: www-style@w3.org

Hi

I'm one of the developers for the Flying Saucer project
(http://xhtmlrenderer.dev.java.net), working on a pure-Java XML/CSS
2.1 renderer.

Right now we're discussing implementation of "inherit" as a value for
CSS properties. In our reading of the CSS 2.1 specification, we've
found two different (and common) wordings for what computed value
means; our interest in this case is in inheriting proportional values
(%).

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.

Many thanks
Patrick
Received on Tuesday, 1 November 2005 16:35:10 GMT

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