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

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