@@ -135,7 +135,7 @@ and the [=return type=] is optionally given by the <<css-type>> following the "r
135
135
</pre>
136
136
137
137
However,
138
- any <<syntax>> that requires a <<combinator>>
138
+ any <<syntax>> that requires a <<syntax- combinator>>
139
139
needs to be wrapped in the <code> type()</code> function:
140
140
141
141
<pre class='lang-css'>
@@ -608,21 +608,19 @@ on [=function parameters=],
608
608
or [=custom function=] return values.
609
609
610
610
<pre class="prod def" nohighlight>
611
-
612
- <dfn><<type-name>></dfn> = angle | color | custom-ident | image | integer |
613
- length | length-percentage | number |
614
- percentage | resolution | string | time |
615
- url | transform-function
616
- <dfn><<combinator>></dfn> = '|'
617
- <dfn><<multiplier>></dfn> = [ '#' | '+' ]
618
- <dfn><<syntax-component-name>></dfn> = '<' <<type-name>> '>' | <<custom-ident>>
619
- <dfn><<syntax-component>></dfn> = <<syntax-component-name>> <<multiplier>> ? |
620
- '<' transform-list '>'
621
- <dfn><<syntax>></dfn> = '*' | <<syntax-component>> [ <<combinator>> <<syntax-component>> ]+
622
-
611
+ <dfn><<syntax-type>></dfn> = angle | color | custom-ident | image | integer |
612
+ length | length-percentage | number |
613
+ percentage | resolution | string | time |
614
+ url | transform-function
615
+ <dfn><<syntax-combinator>></dfn> = '|'
616
+ <dfn><<syntax-multiplier>></dfn> = [ '#' | '+' ]
617
+ <dfn><<syntax-component-name>></dfn> = '<' <<syntax-type>> '>' | <<custom-ident>>
618
+ <dfn><<syntax-component>></dfn> = <<syntax-component-name>> <<syntax-multiplier>> ? |
619
+ '<' transform-list '>'
620
+ <dfn><<syntax>></dfn> = '*' | <<syntax-component>> [ <<syntax-combinator>> <<syntax-component>> ]+
623
621
</pre>
624
622
625
- A <<syntax-component>> consists of either a <<type-name >> ,
623
+ A <<syntax-component>> consists of either a <<syntax-type >> ,
626
624
which maps to one of the [=supported syntax component names=] ;
627
625
or a <<custom-ident>> , which represents any [=keyword=] .
628
626
Additionally,
@@ -641,19 +639,21 @@ against a value
641
639
in the specified order.
642
640
643
641
<div class='example'>
644
- <pre class='lang-css'>
645
- <percentage> | <number> | auto
646
- </pre>
642
+ <xmp class='lang-css'>
643
+ <percentage> | <number> | auto
644
+ </xmp>
645
+
647
646
The above, when parsed as a <<syntax>> ,
648
647
would accept <<percentage>> values,
649
648
<<number>> values,
650
649
as well as the keyword <code> auto</code> .
651
650
</div>
652
651
653
652
<div class='example'>
654
- <pre class='lang-css'>
655
- red | <color>
656
- </pre>
653
+ <xmp class='lang-css'>
654
+ red | <color>
655
+ </xmp>
656
+
657
657
The [=syntax definition=] resulting from the above <<syntax>> ,
658
658
when used as a grammar for [=parse|parsing=] ,
659
659
would match an input <code> red</code> as an [=identifier=] ,
@@ -665,11 +665,11 @@ The <code>*</code> <<delim-token>> represents the [=universal syntax definition=
665
665
The <code> <transform-list></code> production
666
666
is a convenience form equivalent to <code> <transform-function>+</code> .
667
667
<span class=note> Note that <code> <transform-list></code> may not
668
- be followed by a <<multiplier>> .</span>
668
+ be followed by a <<syntax- multiplier>> .</span>
669
669
670
670
[=Whitespace=] is not allowed
671
671
between the angle bracket <<delim-token>> s (<code> <</code> <code> ></code> )
672
- and the <<type-name >> they enclose,
673
- nor is [=whitespace=] allowed to precede a <<multiplier>> .
672
+ and the <<syntax-type >> they enclose,
673
+ nor is [=whitespace=] allowed to precede a <<syntax- multiplier>> .
674
674
675
675
Note: The [=whitespace=] restrictions also apply to <code> <transform-list></code> .
0 commit comments