- From: Justin Rogers <justrog@microsoft.com>
- Date: Tue, 22 Mar 2011 18:03:48 +0000
- To: "L. David Baron" <dbaron@dbaron.org>, Ojan Vafai <ojan@chromium.org>
- CC: "www-style@w3.org" <www-style@w3.org>, David Hyatt <hyatt@apple.com>, "koivisto@iki.fi" <koivisto@iki.fi>
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. Justin Rogers [MSFT] -----Original Message----- From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf Of L. David Baron Sent: Tuesday, March 22, 2011 9:51 AM To: Ojan Vafai Cc: www-style@w3.org; David Hyatt; koivisto@iki.fi Subject: Re: selectors in :any On Tuesday 2011-03-22 18:18 +1100, Ojan Vafai wrote: > For now, WebKit's implementation of :any is following Mozilla's lead > and only allowing simple selectors. I don't see any need for this restriction. > Are there any objections to allowing all selectors? > > I see a similar discussion has happend for :not and that there seemed > to be agreement that we'd change :not in Selectors 4 to not restrict > to simple > selectors.* FWIW, the restrictions on the two are actually different. The arguments to :-moz-any() are what CSS2.1 calls a simple selector and what css3-selectors calls a sequence of simple selectors. The argument to :not() is what CSS2.1 calls a component of a simple selector and what css3-selectors calls a simple selector. So there are a bunch of options for what we could change. We could: * change :not() to accept what CSS2.1 calls a simple selector and what css3-selectors calls a sequence of simple selectors. * change either to accept a selector (which implicitly makes :any() take a group of selectors, since it's comma operator is essentially the same as selector grouping) * change :not() to accept a group of selectors (I regret not formally objecting to the shifts in terminology.) -David -- L. David Baron http://dbaron.org/ Mozilla Corporation http://www.mozilla.com/
Received on Tuesday, 22 March 2011 18:04:22 UTC