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

Contradiction in CSS2 specificity rules

From: Ian Hickson <py8ieh@bath.ac.uk>
Date: Mon, 18 Jan 1999 00:00:28 +0000 (BST)
To: www-style <www-style@w3.org>
Message-ID: <Pine.GSO.4.04.9901172340150.18084-100000@midge.bath.ac.uk>

As per 6.4.1 [1]:

    3. 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.

And yet in 6.4.3 [2]:

     * count the number of element names in the selector (= c)
     * ignore pseudo-elements.

What gives? Do pseudo-elements have specificity or not?

Note that it makes no difference either way, actually - whether a
pseudo-element has specificity or not, the same rules will get
applied because of rule 1 in section 6.4.1.

But it would be good if the spec was self-consistent...


References:
[1] http://www.w3.org/TR/REC-CSS2/cascade.html#cascading-order
[2] http://www.w3.org/TR/REC-CSS2/cascade.html#specificity

-- 
Ian Hickson
Received on Sunday, 17 January 1999 19:00:34 GMT

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