Re: [css3-selectors] Grouping

On Fri, Jan 8, 2010 at 12:19 PM, Nikita Popov <privat@ni-po.com> wrote:
> I have yet another question about the exact syntax of the pseudo-class:
> Could I for example use this rule
> .page form:any(> input, label select)
> to match all input elements, that are direct descendants of forms or selects
> what are contained in a label?
> (At least it would make sense, if allowing the attribute selectors in
> :any())

Hmm, that's interesting.  You want a space between the form and :any,
since this isn't a pseudoclass for the form. (That is, you're not
trying to match the form.)

It's still just syntax sugar for ".page form > input, .page form label
select", so I don't see any technical problems with it.  I don't know
if we want to allow a naked combinator at the front like that, though.
 You could avoid that with:

.page form :any(form > input, label select) {}

~TJ

Received on Friday, 8 January 2010 18:25:53 UTC