Skip to content

Commit 280064d

Browse files
authored
[css-values-5] Minor syntax fixes (#9589)
- defines toggle() in a production rule - removes extra semicolon in random() production - replaces "<any-value> ; ..." with "<declaration-value> ; ..." (<any-value> eats semicolons)
1 parent ad6bf50 commit 280064d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

css-values-5/Overview.bs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,9 @@ Toggling Between Values: ''toggle()''</h3>
596596

597597
The syntax of the ''toggle()'' expression is:
598598

599-
<pre>toggle( <<whole-value>> [ ';' <<whole-value>> ]+ )</pre>
599+
<pre class=prod>
600+
<dfn><<toggle()>></dfn> = toggle( <<whole-value>> [ ';' <<whole-value>> ]+ )
601+
</pre>
600602

601603
Note: This [=functional notation=] uses semicolons to separate arguments
602604
rather than the more typical comma
@@ -980,7 +982,7 @@ Generating a Random Numeric Value: the ''random()'' function</h3>
980982
optionally limiting the possible values to a step between those limits:
981983

982984
<pre class=prod>
983-
&lt;random()> = random( <<random-caching-options>>? , <<calc-sum>>, <<calc-sum>>, [by <<calc-sum>>]? );
985+
&lt;random()> = random( <<random-caching-options>>? , <<calc-sum>>, <<calc-sum>>, [by <<calc-sum>>]? )
984986
985987
<dfn><<random-caching-options>></dfn> = <<dashed-ident>> || per-element
986988
</pre>
@@ -1142,7 +1144,7 @@ Picking a Random Item From a List: the ''random-item()'' function</h3>
11421144
from among its list of items.
11431145

11441146
<pre class=prod>
1145-
&lt;random-item()> = random-item( <<random-caching-options>> ';' <<any-value>> [ ';' <<any-value>> ]* )
1147+
&lt;random-item()> = random-item( <<random-caching-options>> ';' <<declaration-value>>? [ ';' <<declaration-value>>? ]* )
11461148
</pre>
11471149

11481150
The <em>required</em> <<random-caching-options>>
@@ -1178,7 +1180,7 @@ Picking a Random Item From a List: the ''random-item()'' function</h3>
11781180
but optional in ''random()'',
11791181
both for parsing reasons
11801182
(it's impossible to tell whether ''random-item(--foo; --bar; --baz)''
1181-
has three <<any-value>> arguments
1183+
has three <<declaration-value>> arguments
11821184
or two and a <<random-caching-options>> argument),
11831185
and because accidentally associating the random generation of ''random-item()'' functions together
11841186
is much easier to do accidentally,

0 commit comments

Comments
 (0)