W3C home > Mailing lists > Public > www-style@w3.org > March 2013

Re: [css-selectors] Proposal: Logical Combinators / Sets

From: Clint Hill <clint.hill@gmail.com>
Date: Wed, 13 Mar 2013 12:09:16 -0700
To: Henrik Andersson <henke@henke37.cjb.net>, François REMY <francois.remy.dev@outlook.com>, Brian Kardell <bkardell@gmail.com>, "liam@w3.org" <liam@w3.org>
CC: Bjoern Hoehrmann <derhoermi@gmx.net>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <CD661CBB.6CDC%clint.hill@gmail.com>
Boolean Algebra certainly. But wouldn't syntax make that easier?

On 3/13/13 12:01 PM, "Henrik Andersson" <henke@henke37.cjb.net> wrote:

>François REMY skriver:
>> If I'm not mistaken, here is the kind of selectors Brian's proposal is
>>aimed to :
>> 
>>     :not(#a) {
>>         selects all elements that are not #a
>>     }
>>     
>>     :and(#a *, #b *) {
>>         selects all elements that have both a #a and a #b parent
>>     }
>>     
>>     :or(#a, #b) {
>>         selects all elements that are either #a or #b
>>     }
>> 
>> The other proposals (like anyOf, oneOf...) can be emulated using those
>>three. Currently, we already have ':not()' (but I think it's somewhat
>>limited to simple selectors) and it's already possible to emulate
>>':or()' using commas. So "a :or(b,c) d" == "a b d, a c d". So what's
>>really missing is the ':and' operator.
>> 
>> (Brian if I'm wrong please correct me)
>> 
>> 
>
>Boolean algebra says that you can fake and using or. !(!X || !Y) == X &&
>Y It works in the other direction too. !(!X && !Y) == X || Y
>
>
Received on Wednesday, 13 March 2013 19:09:41 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:06 GMT