W3C home > Mailing lists > Public > www-style@w3.org > September 2010

Re: Enhancing grouping of selectors

From: Paul Duffin <pduffin@volantis.com>
Date: Fri, 17 Sep 2010 16:09:17 -0600 (MDT)
To: "L. David Baron" <dbaron@dbaron.org>
Cc: Matthew Millar <mattmill30@hotmail.com>, www-style@w3.org, "Tab Atkins Jr." <jackalmage@gmail.com>
Message-ID: <140380292.18541.1284761357691.JavaMail.root@zimbra.volantis.com>
----- 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.

: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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:49:47 UTC