- From: Bert Bos <Bert.Bos@sophia.inria.fr>
- Date: Mon, 26 Jul 1999 12:50:44 +0200 (MET DST)
- To: www-style@w3.org, css2-editors@w3.org
Karl Randolph writes: > 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? That looks like a (small) error in the spec. I don't think it matters whether you count pseudo-elements or not, but an explicit contradiction in the spec is rather sloppy. Bert -- Bert Bos ( W 3 C ) http://www.w3.org/ http://www.w3.org/people/bos/ W3C/INRIA bert@w3.org 2004 Rt des Lucioles / BP 93 +33 (0)4 92 38 76 92 06902 Sophia Antipolis Cedex, France
Received on Monday, 26 July 1999 06:50:51 UTC