Re: selectors in :any

On Tue, Mar 22, 2011 at 11:03 AM, Justin Rogers <justrog@microsoft.com> wrote:
> http://hacks.mozilla.org/2010/05/moz-any-selector-grouping/
>
> I'm using the above for reference. I'm a little bit concerned here. It seems the standard rules of selectors are broken by the syntax. Namely that a simple selector consisting of a pseudo class :foo is actually the selector *|*:foo, but the example notes that the replacement for :-moz-any is in place and is no longer a "tag rule". This is creative, but if we plan on doing this we should introduce a concept into the grammar which is not a pseudo-class that allows you to root the front of a selector using a new special character so you can disambiguate from a standard tag rule immediately.

I don't see what's broken here.  :any(a,b) is still identical to
*|*:any(a,b).  The fact that you're specializing the tag selector more
than once is a minor detail; the same applies to a:any(a,b).  (The
fact that a rule ending in :-moz-any() doesn't fall into the "tag
bucket" is just an implementation detail, as the blog post notes.)

~TJ

Received on Tuesday, 22 March 2011 18:15:06 UTC