- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Fri, 8 Jan 2010 12:25:26 -0600
- To: Nikita Popov <privat@ni-po.com>
- Cc: Brad Kemper <brad.kemper@gmail.com>, www-style list <www-style@w3.org>
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