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 16:52:03 UTC