@@ -479,6 +479,41 @@ Property Value Examples</h3>
479
479
</table>
480
480
</div>
481
481
482
+ <h3 id="production-blocks">
483
+ Non-Terminal Definitions and Grammar Production Blocks</h3>
484
+
485
+ The precise grammar of non-terminals, like <<position>> or <<calc()>> ,
486
+ is often specified in a <dfn export>CSS grammar production block</dfn> .
487
+ These are conventionally represented in a preformatted block of definitions
488
+ like this:
489
+
490
+ <div class="example">
491
+ The <css> <foo></css> syntax is defined as follows:
492
+
493
+ <xmp class=prod>
494
+ <foo> = keyword | <bar> |
495
+ some-really-long-pattern-of-stuff
496
+ <bar> = <length>
497
+ </xmp>
498
+ </div>
499
+
500
+ Each definition starts on its own line,
501
+ and consists of the non-terminal to be defined,
502
+ followed by an <code> =</code> ,
503
+ followed by the fragment of [=value definition syntax=] to which it expands.
504
+ A definition can stretch across multiple lines,
505
+ and terminates before the next line that starts a new grammar production
506
+ or at the end of the grammar production block
507
+ (whichever comes first).
508
+
509
+ <div class="example">
510
+ In the above example, the <css> <foo></css> definition covers two lines.
511
+ The third line starts a new definition for <css> <bar></css> .
512
+ (A naked <code> =</code> is never valid in [=value definition syntax=] ,
513
+ so it's unambiguous when a new line starts a fresh definition.)
514
+ </div>
515
+
516
+
482
517
<h2 id="combining-values">
483
518
Combining Values: Interpolation, Addition, and Accumulation</h2>
484
519
@@ -5196,6 +5231,8 @@ Recent Changes</h3>
5196
5231
despite violation of the “avoid dataloss by default principle”--
5197
5232
given existing interoperability and presumed Web-compat restriction.
5198
5233
(<a href="https://github.com/w3c/csswg-drafts/issues/6454">Issue 6452</a> )
5234
+ * Added an explicit definition for the [=CSS grammar production block=] convention.
5235
+ (<a href="https://github.com/w3c/csswg-drafts/issues/2921">Issue 2921</a> )
5199
5236
5200
5237
Substantial changes since <a href="https://www.w3.org/TR/2023/WD-css-values-4-20230406/">6 April 2023 WD</a> :
5201
5238
0 commit comments