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

Re: "inherit" and the cascade

From: Håkon Wium Lie <howcome@opera.com>
Date: Wed, 3 Nov 1999 17:13:09 -0500 (EST)
Message-ID: <14368.45749.270000.442752@VAIO>
To: Todd Fahrner <fahrner@pobox.com>
Cc: www-style@w3.org
Also sprach Todd Fahrner:

 > It is my belief that the CSS-2 "inherit" value should work within the 
 > cascade; i.e., that it may be overridden with a selector of greater 
 > specificity.

Correct. The specificity of the associated selector determines if the
value will be used or not. The value itself never changes the cascade.

 > The spec doesn't make this quite clear: 
 > http://www.w3.org/TR/REC-CSS2/cascade.html#value-def-inherit

It's not explicit there, but I don't see how this can be
misunderstood. Section 6.4.1 specifies the algorithm for finding
property/value pairs, and the "inherit" value isn't treated in any
particular way.

I think the best way to resolve this issue is to make sure the CSS2
test suites cover this very clearly.

 > Apart from use in user stylesheets, the primary utility of the 
 > inherit value, as I see it, is simply to assert that normal 
 > inheritance should work, instead of not-work, as in the infamous case 
 > of TABLE and its parents in dominant UAs.

Horror, yes.

 > I am testing an implementation in which all of the paragraphs in the 
 > test document below are black. It's also at 
 > http://verso.com/~todd/inherittest.html. I think this is in error. Is 
 > this correct?

Yes, the two P elements should both be red.

Note that inheritace is not actually used to transfer the value of
'color' in your example.



Chief Technology Officer                                Opera Software
Håkon Wium Lie                     http://www.opera.com/people/howcome
howcome@opera.com                                gets you there faster
Received on Wednesday, 3 November 1999 17:52:55 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:52 UTC