Someone nerd-sniped me this week, sorry :)
Summary: Implements the :is() and :where() pseudo-classes from the CSS
selectors level 4 spec. These allow to adjust the specificity of
selectors and write selectors that weren't possible before.
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1509418
Standard:
* https://drafts.csswg.org/selectors/#matches
* https://drafts.csswg.org/selectors/#zero-matches
Platform coverage: All
Preference: layout.css.is-where-selectors.enabled
Devtools bug: N/A: Devtools doesn't have autocomplete or such features
for selectors, and I think everything else should work out of the box.
But let me know if you disagree.
Some better tools to visualize specificity or such would be great, but a
bit unrelated to this.
Other browsers:
* Safari: Implemented in TP. They have shipped since forever an
outdated version of the spec (:matches instead of :is).
* Chrome: They had a bogus implementation that never shipped.
web-platform-tests:
There are a few in https://wpt.fyi/results/css/selectors and in the
invalidation subdirectory, which is great because invalidation of these
is tricky. But there are a few other tests missing which I want to add
before enabling the pref in all channels.
Secure contexts: Like all other CSS selectors these are not restricted
to secure contexts.
Is this feature enabled by default in sandboxed iframes?: Yes
-- Emilio
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform