Re: "inherit" and the cascade

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: 

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 
 > 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                                           gets you there faster

Received on Wednesday, 3 November 1999 17:52:55 UTC