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

Selectors' Specificity

From: Karl Randolph <humanbeing@mail.com>
Date: Mon, 26 Jul 1999 00:28:12 -0400 (EDT)
Message-ID: <385969134.932963292891.JavaMail.root@web04.pub01>
To: www-style@w3.org
I'm reading CSS2 for the first time. I have not read other letters to this
place, so I don't know whether someone else has discussed this.

In section 6.4.1 (Cascading order), step three is as follows:

The secondary sort is by specificity of selector: more specific selectors
will override more general ones. Pseudo-elements and pseudo-classes are
counted as normal elements and classes, respectively.

while in section 6.4.3 (Calculating a selector's specificity), user agents
are to

* count the number of ID attributes in the selector (= a)
* count the number of other attributes and pseudo-classes in the selector (=
b)
* count the number of element names in the selector (= c)
* ignore pseudo-elements.

What is "ignore pseudo-elements" supposed to mean? If I were to use a
pseudo-element as a selector, would its specificity be a=0 b=0 c=1, or would
it be c=0?

__________________________________________________
FREE Email for ALL! Sign up at http://www.mail.com
Received on Monday, 26 July 1999 00:28:14 GMT

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