Skip to content

Commit c987ff2

Browse files
committed
[css-syntax-3] Add note about how rule contents actually get parsed (it's via grammar).
1 parent 2bfc091 commit c987ff2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

css-syntax-3/Overview.bs

+12
Original file line numberDiff line numberDiff line change
@@ -2477,6 +2477,18 @@ Consume a simple block</h4>
24772477
and append it to the value of the block.
24782478
</dl>
24792479

2480+
Note: CSS has an unfortunate syntactic ambiguity
2481+
between blocks that can contain declarations
2482+
and blocks that can contain qualified rules,
2483+
so any "consume" algorithms that handle rules
2484+
will initially use this more generic algorithm
2485+
rather than the more specific
2486+
[=consume a list of declarations=]
2487+
or [=consume a list of rules=] algorithms.
2488+
These more specific algorithms are instead invoked when grammars are applied,
2489+
depending on whether it contains a <<declaration-list>>
2490+
or a <<rule-list>>/<<stylesheet>>.
2491+
24802492

24812493
<h4 id="consume-function">
24822494
Consume a function</h4>

0 commit comments

Comments
 (0)