Re: Enhancing grouping of selectors

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 UTC