W3C home > Mailing lists > Public > www-style@w3.org > March 2009

Re: [CSS21] Making sense of 6.4.4

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 13 Mar 2009 19:55:17 -0400
Message-ID: <49BAF265.3090308@mit.edu>
To: Anton Prowse <prowse@moonhenge.net>
CC: "www-style@w3.org" <www-style@w3.org>
Anton Prowse wrote:
>   # The following user style sheet would override the font weight of 'b'

The key word there is "user".

> In particular, I interpret that paragraph as saying that for the HTML 
> markup fragment
>   <font color="green">lorem ipsum</font>
> the author style sheet is treated as having the rule set
>   font[color] { color: attr(color); }
> at its start, and that the selector in that rule set has specificity 0.

Yep.  That seems like a reasonable interpretation.

>  This would mean that a later specified rule set
>   font[color] { color: orange; }
> would win out, being later in the cascade and trivially having equal or 
> greater specificity (in fact, it has specificity 11=(0,0,1,1)).

Yes, for an author rule like that.

> But that's not what the example says, so I'm getting something wrong 
> somewhere.

The example has a user rule, not an author rule.

Received on Friday, 13 March 2009 23:58:52 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:25 UTC