W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2018

Re: [csswg-drafts] [selectors4] Name the “functional pseudo-class like :matches() with 0 specificity”

From: Wes via GitHub <sysbot+gh@w3.org>
Date: Thu, 05 Jul 2018 09:39:02 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-402665759-1530783541-sysbot+gh@w3.org>
Answered on twitter to LeaVerou already, but I'm adding it here too. Imho the problem is that `:not()` contributes positively to specificity.

If `a.foo` is `0 1 1`,
and `a` is `0 0 1`,
`a:not(.foo)` should be `0 -1 0`

https://pbs.twimg.com/media/DhVNC28WsAEbVHP.jpg

```
a:but(.foo.bar){}
/* is overridden by ... */
a:but(.foo){} 
/* is overridden by ... */
a.foo{} 
/* is overridden by ... */
a.foo.bar{}
```

Not sure if this is feasible, but the first time I tried `:not()` I expected it to work this way...

-- 
GitHub Notification of comment by Netmosfera
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2143#issuecomment-402665759 using your GitHub account
Received on Thursday, 5 July 2018 09:39:20 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 5 July 2018 09:39:21 UTC