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

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

From: Evan Minto via GitHub <sysbot+gh@w3.org>
Date: Thu, 07 Jun 2018 01:04:34 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-395260343-1528333474-sysbot+gh@w3.org>
Just a member of the community chiming in here. I think a big reason not to move off of `:matches()` that hasn't been mentioned in this issue is the DOM method [`Element.matches()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/matches). Developers may be familiar with _both_ the JS and CSS features, and renaming just one of them even though they serve similar purposes (with identical selector syntax) is likely to be pretty confusing.

Though I agree the `:not()` vs. `:is()` thing is a bit confusing, I also think there's something kind of logical about `:is()` vs. `:matches()`. "Is" feels like it's just the way the thing is, independent of selector logic, but "matches" feels like it kicks off a process to compute something, so the specificity rules are going to matter.

...at least that's the mnemonic _I'd_ use to teach this to new devs!

GitHub Notification of comment by evanminto
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2143#issuecomment-395260343 using your GitHub account
Received on Thursday, 7 June 2018 01:04:52 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 2 July 2022 03:21:09 UTC