Re: selectors in :any

On Wed, Mar 23, 2011 at 3:51 AM, L. David Baron <dbaron@dbaron.org> wrote:

> 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.
>

Lol. That's complicated. I think I was using css3-selectors terminology
then.


> 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 was suggesting that both of them should accept a group of selectors. It
seems superior from a web developer perspective and, at least in WebKit, it
would be simpler to implement than the current model.

Ojan


> (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 23:36:45 UTC