Re: Enhancing grouping of selectors

----- Original Message -----
> On Friday 2010-09-17 08:03 -0700, Tab Atkins Jr. wrote:
> > This runs into issues with scoping. From what it looks like, your &
> > combinator only lets you group together selectors that form a single
> > element (that is, no element of the group can have any other
> > combinators). :any() lets you group arbitrary selectors together.
> 
> What I implemented in Gecko is without combinators, actually.
> 
> It wouldn't be particularly hard to implement (though it makes the
> specificity issue in
> http://lists.w3.org/Archives/Public/www-style/2010Feb/thread.html#msg263
> a little more complicated). It might make the selectors a good bit
> harder to read, though.
> 

What about the specificity issue?

If it is supposed to behave as the exploded version then that will make it harder to implement efficiently but doing it any other way will mean that it is not exactly equivalent to the exploded version.

e.g.
:any (e #id .class) :any (e #id .class) :any (e #id .class) {...}

Would explode to 27 rules with specificities ranging from 003 to 300.

So I guess the question is, is this intended as a shorthand for authors or an optimization?

Received on Friday, 17 September 2010 22:09:51 UTC