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

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