W3C home > Mailing lists > Public > www-style@w3.org > August 2002

A question about specificity

From: Scott Montgomery <scott@scottshelly.com>
Date: Sat, 31 Aug 2002 16:16:55 +0200
Message-ID: <002601c250f9$1025d9b0$e1d98b50@HomeStation>
To: <www-style@w3.org>

I'm trying to understand two statements from the CSS 2.1 WD (see below) that
seem to contradict each other.  Could someone explain if this is a
contradiction.  Or am I just misunderstanding?

In 6.4.1 Cascading order
the WD says:

3.  Sort 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 then in 6.4.3 Calculating a selector's specificity
(http://www.w3.org/TR/2002/WD-CSS21-20020802/cascade.html#specificity), the
WD says:

... ignore pseudo-elements.

It seems that in one place the WD is saying to count pseudo-elements when
calculating specificity and then in another place to ignore pseudo-elements.
I would appreciate any help or insight on this issue.  I help teach two CSS
classes at IWA-HWG (http://www.iwaguild.com), and this question has come up
more than once from students.

Thank you,

Scott Montgomery
Received on Saturday, 31 August 2002 10:17:59 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:03 UTC