Re: Increasing specificity through pseudo-class repetition

> Should repeated instances of a pseudo-class be ignored by the parser ?
> Or do they increase the selector's specificity ? (See testcase below).

First, these repeated instances are not invalid or ignored according to
the current spec. If we ignore :first-child:first-child, then we should
also ignore .foo.foo or even the allowed #foo#foo...
After all, JS or c++ allow |if (foo && foo)|, right ?

Second, yes, they increase selector's specificity. Relying on that is
hacky and should be strongly discouraged but I don't think we should
rule out such repeated instances.

My 0.02€.

</Daniel>

Received on Wednesday, 15 July 2009 10:14:37 UTC