Commit a0a6e9e
authored
[css-cascade-6] Disallow empty scope() functions (#13721)
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.)1 parent 48ca237 commit a0a6e9e
1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
127 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
| |||
658 | 659 | | |
659 | 660 | | |
660 | 661 | | |
661 | | - | |
| 662 | + | |
662 | 663 | | |
663 | 664 | | |
664 | 665 | | |
665 | 666 | | |
666 | 667 | | |
667 | 668 | | |
668 | | - | |
| 669 | + | |
669 | 670 | | |
670 | 671 | | |
671 | 672 | | |
| |||
0 commit comments