[csswg-drafts] [selectors-4] Disallow empty `:is()`/`:where()`? (#11808)

cdoublev has just created a new issue for https://github.com/w3c/csswg-drafts:

== [selectors-4] Disallow empty `:is()`/`:where()`? ==
Browers seem to accept empty `:is()`/`:where()`, which is invalid according to their [grammar](https://drafts.csswg.org/selectors-4/#grammar): [`<any-value>`](https://drafts.csswg.org/css-syntax-3/#typedef-any-value) requires one or more tokens (excluding whitespaces, presumably).

The [procedure](https://drafts.csswg.org/selectors-4/#parse-as-a-forgiving-selector-list) to parse its arguments may produce an empty output... but it needs to be updated following the resolution in #8356 to preserve invalid selectors.

On the other hand, future functional pseudos might want to take an optional argument or no argument. So at least, `<any-value>` could be made optional?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11808 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 2 March 2025 18:09:58 UTC