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

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

From: SelenIT via GitHub <sysbot+gh@w3.org>
Date: Sat, 30 Dec 2017 19:40:56 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-354564450-1514662854-sysbot+gh@w3.org>
I’m not sure that `:matches()` can, and needs to, be “fixed”. For me, the summary of #1027 is that `:matches()` doesn’t have any special performance problems per se (except it allows to write seemingly short selectors equivalent to terribly long selector lists,  but this problem is not new, it often occurs with CSS preprocessors as well). Also, `:matches()` has been supported in Safari since 2015, and there is [intent to implement it in Chrome](https://groups.google.com/a/chromium.org/forum/m/#!topic/blink-dev/kqD_G4sxfZE), so changing it can break the interoperability. And, AFAIK, it wasn’t meant to affect specificity in any way, it’s sole purpose was to be syntactic sugar for shortening the lists of selectors with common parts for readability and reducing style bloating. The `:is()` selector, on the other hand, was introduced specifically to explicitly control the specificity, so I doubt that it could become redundant.

-- 
GitHub Notification of comment by SelenIT
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2143#issuecomment-354564450 using your GitHub account
Received on Saturday, 30 December 2017 19:40:57 UTC

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