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

Re: Enhancing grouping of selectors

From: L. David Baron <dbaron@dbaron.org>
Date: Sun, 19 Sep 2010 11:06:52 -0700
To: Boris Zbarsky <bzbarsky@MIT.EDU>
Cc: Anne van Kesteren <annevk@opera.com>, www-style@w3.org
Message-ID: <20100919180652.GA32585@pickering.dbaron.org>
On Sunday 2010-09-19 13:28 -0400, Boris Zbarsky wrote:
> On 9/19/10 8:49 AM, Anne van Kesteren wrote:
> >>:not(a.foo)
> ...
> 
> >Really? I would expect :not(a):not(.foo) personally. Seems more in line
> >with how a.foo works (without :not()).
> 
> Thank you _very_ much for illustrating the confusion that can arise!
> 
> "a.foo" means "tag name is 'a' AND class is 'foo'".
> 
> So :not(a.foo) ought to be the negation of that statement.  Applying
> De Morgan's law, that would be "tag name is not 'a' OR class is not
> 'foo'", which is the same as:
> 
>   :not(a), :not(.foo).

I think it's more likely that the confusion is over what
:not(a):not(.foo) means than over what :not(a.foo) means, though.
If that's the case, then that's an argument that we should allow
:not(a.foo).

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Sunday, 19 September 2010 18:07:37 GMT

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