Re: [csswg-drafts] [selectors-4] Rename :matches() to :is()

It strikes me that different things appear to be logical depending on which particular things we are looking at the time.  The name for some functional "do any of these things match" has taken a lot of twists and turns over the years, for various reasons in various contexts.  The DOM APIs today, for example, have `matches()` which tests whether the element matches any of the selectors.  What we are talking about are, kind of pseudos that do that too, so it seems there is some symmetry there as spec'ed today. Maybe that is interesting? In any case, I'm really not sure, and I'm not making any specific case - but given the number of threads on many related things all dealing with naming and desire to flip about - I wonder if It might be somehow worthwhile to consider contexts, history and relationships here?

For example, I've seen what I thought were compelling cases why `:any(...)` makes sense as the name of the pseudo in CSS, but never a proposal that that would have made a good name in the DOM for something that does kinda the same thing.  There, it was pretty much between `.matchesSelector`, `.matches` and `.is`.  The first was deemed too verbose in DOM and woudn''t make a lot of sense in CSS.  The last makes a lot of sense in CSS but in the DOM, on an element, was potentially problematic.

If we are now talking about 3 things - and one is special in that it has no specificity, perhaps having that thing have close symmetry with the single similar DOM method makes some kind of sense?

-- 
GitHub Notification of comment by bkardell
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3258#issuecomment-438425776 using your GitHub account

Received on Tuesday, 13 November 2018 20:31:40 UTC