Skip to content

Commit ede911b

Browse files
committed
[css-mixins-1] Rename the <syntax> productions to make them unique. #10557
1 parent f4c8c98 commit ede911b

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

css-mixins-1/Overview.bs

+23-23
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ and the [=return type=] is optionally given by the <<css-type>> following the "r
135135
</pre>
136136

137137
However,
138-
any <<syntax>> that requires a <<combinator>>
138+
any <<syntax>> that requires a <<syntax-combinator>>
139139
needs to be wrapped in the <code>type()</code> function:
140140

141141
<pre class='lang-css'>
@@ -608,21 +608,19 @@ on [=function parameters=],
608608
or [=custom function=] return values.
609609

610610
<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>> ]+
623621
</pre>
624622

625-
A <<syntax-component>> consists of either a <<type-name>>,
623+
A <<syntax-component>> consists of either a <<syntax-type>>,
626624
which maps to one of the [=supported syntax component names=];
627625
or a <<custom-ident>>, which represents any [=keyword=].
628626
Additionally,
@@ -641,19 +639,21 @@ against a value
641639
in the specified order.
642640

643641
<div class='example'>
644-
<pre class='lang-css'>
645-
&lt;percentage&gt; | &lt;number&gt; | auto
646-
</pre>
642+
<xmp class='lang-css'>
643+
<percentage> | <number> | auto
644+
</xmp>
645+
647646
The above, when parsed as a <<syntax>>,
648647
would accept <<percentage>> values,
649648
<<number>> values,
650649
as well as the keyword <code>auto</code>.
651650
</div>
652651

653652
<div class='example'>
654-
<pre class='lang-css'>
655-
red | &lt;color&gt;
656-
</pre>
653+
<xmp class='lang-css'>
654+
red | <color>
655+
</xmp>
656+
657657
The [=syntax definition=] resulting from the above <<syntax>>,
658658
when used as a grammar for [=parse|parsing=],
659659
would match an input <code>red</code> as an [=identifier=],
@@ -665,11 +665,11 @@ The <code>*</code> <<delim-token>> represents the [=universal syntax definition=
665665
The <code>&lt;transform-list&gt;</code> production
666666
is a convenience form equivalent to <code>&lt;transform-function&gt;+</code>.
667667
<span class=note>Note that <code>&lt;transform-list&gt;</code> may not
668-
be followed by a <<multiplier>>.</span>
668+
be followed by a <<syntax-multiplier>>.</span>
669669

670670
[=Whitespace=] is not allowed
671671
between the angle bracket <<delim-token>>s (<code>&lt;</code> <code>&gt;</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>>.
674674

675675
Note: The [=whitespace=] restrictions also apply to <code>&lt;transform-list&gt;</code>.

0 commit comments

Comments
 (0)