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,

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

[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 UTC

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