Re: Increasing specificity through pseudo-class repetition

Sylvain Galineau wrote:
> Should repeated instances of a pseudo-class be ignored by the parser ?
> Or do they increase the selector's specificity ? (See testcase below).
> The interoperable behavior today is the latter: Opera, Firefox and Safari
> all increase the selector's specificity. IE ignores the repeats and gives
> E:first-child the same specificity as E:first-child:first-child. Given
> that a) no such exceptions are noted in the spec and b) the author has
> explicitly repeated the pseudo-class, I expect this to be a bug for IE.
> I was wondering if this was originally intended, and whether/when it was
> used in practice.

As agreed, I've added a note to the Specificity section

   # Note: Repeated occurrances of the same simple selector are allowed
   # and do increase specificity.

Please let me know if this adequately clarifies the spec.


Received on Wednesday, 21 October 2009 00:06:28 UTC