[csswg-drafts] Pull Request: [css-cascade-6] Disallow empty scope() functions

andruud has just submitted a new pull request for https://github.com/w3c/csswg-drafts:

== [css-cascade-6] Disallow empty scope() functions ==
In the #11237 discussion, we agreed that it makes sense to keep the syntax for scoped imports consistent with layered imports, and while things are mostly consistent already, one inconsistency remains:

 * `layer()` (with no argument) does not define an anonymous layer. You must use the `layer` keyword for this.
 * `scope()` (with no argument) *does* define an implicit scope. You can *also* use the `scope` keyword for this.

We should tighten this up by disallowing empty `scope()`.

With the reference to #scope-limits and its description of roots/limits, I think the correct behavior can be understood well enough from the normative text without further elaboration. However, I added a Note to make it more obvious.

Also, it's a bit awkward to have named productions that match empty/arbitrary streams; use an exclamation point (!) to require at least one value for `<<scope-boundaries>>`. (This has the effect of disallowing empty scope() functions.)


See https://github.com/w3c/csswg-drafts/pull/13721


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

Received on Wednesday, 25 March 2026 12:27:26 UTC