W3C home > Mailing lists > Public > www-style@w3.org > January 2010

Re: [css3-selectors] Grouping

From: Nikita Popov <privat@ni-po.com>
Date: Fri, 08 Jan 2010 19:19:00 +0100
Message-ID: <4B477714.8080208@ni-po.com>
To: Brad Kemper <brad.kemper@gmail.com>
CC: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
Am 08.01.2010 19:05, schrieb Brad Kemper:
> On Jan 8, 2010, at 9:55 AM, Tab Atkins Jr. wrote:
>
>    
>> On Fri, Jan 8, 2010 at 11:33 AM, Nikita Popov<privat@ni-po.com>  wrote:
>>      
>>> I think that the variant with brackets I proposed is little bit better,
>>> because it  could  be more widely used, e.g.
>>> input([type=submit], [type=number], ...)
>>> ("could" because I don't know, whether something like this, would be
>>> good...)
>>>        
>> There's still no need to extend the syntax there.  You can do that
>> with the pseudoclass:
>>
>> input:any([type=submit],[type=number]) {}
>>
>> I don't think there's anything you could do with parens in selectors
>> that wouldn't be possible with the pseudoclass.  As well, you stay
>> within existing syntax, which means we don't have to change the
>> grammar and possibly introduce new bugs.
>>      
> I really like the idea in general, but I'm not sure about it being a pseudo-class. I'm not against that at this point, mind you, but it is not obvious to me if the following two rules are equivalent:
>
> div :any(span,div)
> div:any(span,div)
>
> or would that second version be nonsense, and simple selectors as arguments could only be used with a universal selector (or naked, implying a universal selector there).
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())
Received on Friday, 8 January 2010 18:19:29 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:23 GMT