W3C home > Mailing lists > Public > public-css-archive@w3.org > September 2017

Re: [csswg-drafts] [selectors] Functional pseudo-class like :matches() with 0 specificity

From: Roman Komarov via GitHub <sysbot+gh@w3.org>
Date: Tue, 19 Sep 2017 17:47:55 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-330618101-1505843264-sysbot+gh@w3.org>
@FremyCompany The nested `:not()` with a single selector would be the same as `:matches()`, but with nested `:not()` its possible to hack things around for having a specificity of just one class (see http://kizu.ru/en/fun/controlling-the-specificity/#negation-of-negation).

Though, I agree that we can totally have `:matches()` to be just a shortcut that would keep the specificity, and then we could have the `:when()` (I like that name too) or something similar that would have no specificity added.

-- 
GitHub Notification of comment by kizu
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1170#issuecomment-330618101 using your GitHub account
Received on Tuesday, 19 September 2017 17:47:48 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:18 UTC