Summary: Allow invalid selectors inside :is() and :where() to be
ignored, rather than making the whole selector list invalid.
This would allow to have some sort of escape hatch for the usual footgun
of "one invalid selector in the list makes the whole style rule
invalid", which is generally considered a mistake
This is technically a breaking change, see below for the position of
other engines on this (though these pseudo-classes are relatively
recent, and we're being more permissive). The intention is to enable the
pref on Nightly and Early Beta for now. You'll hear from me when
enabling it everywhere :)
Standard: This implements the resolution for csswg-drafts#3264
>. The spec is yet to be
edited to reflect it.
Platform coverage: All
DevTools bug: I'm not sure if it is necessary to have a devtools bug for
this. The selector will serialize as :is(div) rather than :is(div,
:nonsense), for example. Other than that, devtools should just work. If
folks feel strongly otherwise, please file a bug and cc me on it and
I'll take a look, maybe some more work could be done to surface this
better in DevTools, though it wouldn't be trivial right now to expose it
via the regular CSS parse error reporting mechanism (because parsing
will, in fact, succeed).
Other browsers: Both Blink and Apple engineers have expressed support
for this. Blink still doesn't implement these selectors, Apple engineers
said on the call that they'd follow Gecko if we make the change.
web-platform-tests: Tests for this are added in the bug.