Re: Enhancing grouping of selectors

On Sat, Sep 18, 2010 at 1:26 AM, Paul Duffin <pduffin@volantis.com> wrote:
> ----- Original Message -----
>> (Note, though, that you wrote the selector wrong. :any()'s arguments
>> are comma-separated, because you can have arbitrary selectors as
>> arguments. So it needs to be:
>>
>> :any(e, #id, .class) :any(e, #id, .class) :any(e, #id, .class) {...}
>>
>
> Ok, I couldn't find :any defined anywhere, ,only http://dbaron.org/log/20100424-any

Yeah, it's not in any draft yet.  It's just been discussed on the
mailing list, and then experimentally implemented by dbaron.


> which only allows a simple selector in the :any(). Is that just an implementation limitation?

Are you sure?  The particular example he gives uses only simple
selectors as arguments, but I don't think that's a general restriction
in his implementation.  Right, dbaron?


> On a related note I just looked at :not(), http://www.w3.org/TR/css3-selectors/#negation, which is a similar 'logical pseudo class' and it is limited to a simple selector, and cannot contain itself. What are the reasons for this limitation, e.g. why can't I write any of the following?
> * :not(a.special)
> * :not(li > a)
> * :not(ol > li, ul > li)
>
> The latter could be written as:
> * :not(:any(ol, ul) > li)

Not sure; I wasn't in the group at the time.

~TJ

Received on Saturday, 18 September 2010 17:06:40 UTC