@@ -1333,35 +1333,47 @@ Repeating Gradients: the ''repeating-linear-gradient()'', ''repeating-radial-gra
1333
1333
<h3 id='color-stop-syntax'>
1334
1334
Gradient Color-Stops</h3>
1335
1335
1336
+ All gradients are specified by a list of color stops,
1337
+ giving the color and position of each stop on the [=gradient line=] ,
1338
+ according to the following grammar:
1339
+
1336
1340
<pre class=prod>
1337
1341
<dfn><color-stop-list></dfn> =
1338
- [ <<linear-color-stop>> [, <<linear-color-hint>> ]? ]# , <<linear-color-stop>>
1342
+ <<linear-color-stop>> , [ [ <<linear-color-hint>> , ]? <<linear-color-stop>> ]#
1339
1343
<dfn><linear-color-stop></dfn> = <<color>> && <<color-stop-length>> ?
1340
1344
<dfn><linear-color-hint></dfn> = <<length-percentage>>
1341
1345
<dfn><color-stop-length></dfn> = <<length-percentage>> {1,2}
1342
1346
1343
1347
<dfn><angular-color-stop-list></dfn> =
1344
- [ <<angular-color-stop>> [, <<angular-color-hint>> ]? ]# , <<angular-color-stop>>
1348
+ <<angular-color-stop>> , [ [ <<angular-color-hint>> , ]? <<angular-color-stop>> ]#
1345
1349
<dfn><angular-color-stop></dfn> = <<color>> && <<color-stop-angle>> ?
1346
1350
<dfn><angular-color-hint></dfn> = <<angle-percentage>>
1347
1351
<dfn><color-stop-angle></dfn> = <<angle-percentage>> {1,2}
1348
1352
1349
1353
<dfn><color-stop></dfn> = <<color-stop-length>> | <<color-stop-angle>>
1350
1354
</pre>
1351
1355
1352
- <pre class='railroad'>
1353
- Plus:
1354
- Sequence:
1355
- N: <color-stop>
1356
- Choice: 1
1357
- Sequence:
1358
- T: ,
1359
- N: <color-hint>
1360
- Skip:
1356
+ <div class=note>
1357
+ Note that <<color-stop-list>> and <<angular-color-stop-list>> are exactly identical in structure,
1358
+ they just differ on whether they accept <<length>> s or <<angle>> s
1359
+ for specifying the position of the stops and hints.
1360
+
1361
+ Visualized with a railroad diagram,
1362
+ both of them follow this pattern:
1363
+
1364
+ <pre class='railroad'>
1365
+ N: <color-stop>
1361
1366
T: ,
1362
- T: ,
1363
- N: <color-stop>
1364
- </pre>
1367
+ Plus:
1368
+ Sequence:
1369
+ Optional: skip
1370
+ Sequence:
1371
+ N: <color-hint>
1372
+ T: ,
1373
+ N: <color-stop>
1374
+ T: ,
1375
+ </pre>
1376
+ </div>
1365
1377
1366
1378
<p class='issue'>
1367
1379
Are lengths useful in <<angular-color-stop>> , for a given gradient circle?
0 commit comments