Skip to content

Commit 5e9a938

Browse files
authored
[css-images] Add basic syntax of repeating gradient types (w3c#8775)
1 parent b6a233e commit 5e9a938

File tree

2 files changed

+26
-16
lines changed

2 files changed

+26
-16
lines changed

css-images-3/Overview.bs

+14-8
Original file line numberDiff line numberDiff line change
@@ -331,10 +331,10 @@ Linear Gradients: the ''linear-gradient()'' notation {#linear-gradients}
331331
Its syntax is as follows:
332332

333333
<pre class=prod>
334-
<<linear-gradient()>> = linear-gradient(
335-
[ <<angle>> | to <<side-or-corner>> ]? ,
336-
<<color-stop-list>>
337-
)
334+
<<linear-gradient()>> = linear-gradient( [ <<linear-gradient-syntax>> ] )
335+
336+
<dfn>&lt;linear-gradient-syntax></dfn> = [ <<angle>> | to <<side-or-corner>> ]? , <<color-stop-list>>
337+
338338
<dfn>&lt;side-or-corner></dfn> = [left | right] || [top | bottom]
339339
</pre>
340340

@@ -506,10 +506,11 @@ Radial Gradients: the ''radial-gradient()'' notation {#radial-gradients}
506506
The radial gradient syntax is:
507507

508508
<pre class=prod>
509-
<<radial-gradient()>> = radial-gradient(
510-
[ <<rg-ending-shape>> || <<rg-size>> ]? [ at <<position>> ]? ,
511-
<<color-stop-list>>
512-
)
509+
<<radial-gradient()>> = radial-gradient( [ <radial-gradient-syntax> ] )
510+
511+
<dfn>&lt;radial-gradient-syntax></dfn> =
512+
<<rg-ending-shape>> || <<rg-size>> ]? [ at <<position>> ]? ,
513+
<<color-stop-list>>
513514
514515
<dfn>&lt;rg-size></dfn> = <<rg-extent-keyword>> | <<length [0,∞]>> | <<length-percentage [0,∞]>>{2}
515516
@@ -770,6 +771,11 @@ Repeating Gradients: the ''repeating-linear-gradient()'' and ''repeating-radial-
770771
and are interpreted the same
771772
as their respective non-repeating siblings defined previously.
772773

774+
<pre class=prod>
775+
<dfn>&lt;repeating-linear-gradient()></dfn> = repeating-linear-gradient( [ <<linear-gradient-syntax>> ] )
776+
<dfn>&lt;repeating-radial-gradient()></dfn> = repeating-radial-gradient( [ <<radial-gradient-syntax>> ] )
777+
</pre>
778+
773779
When rendered, however, the color-stops are repeated infinitely in both directions,
774780
with their positions shifted by multiples of the difference between
775781
the last specified color-stop's position

css-images-4/Overview.bs

+12-8
Original file line numberDiff line numberDiff line change
@@ -1197,10 +1197,9 @@ Linear Gradients: the ''linear-gradient()'' notation {#linear-gradients}
11971197
See [[css-color-4#interpolation]].
11981198

11991199
<pre class=prod>
1200-
<dfn>linear-gradient()</dfn> = linear-gradient(
1200+
<dfn>&lt;linear-gradient-syntax></dfn> =
12011201
[ [ <<angle>> | to <<side-or-corner>> ] || <<color-interpolation-method>> ]? ,
12021202
<<color-stop-list>>
1203-
)
12041203
<dfn>&lt;side-or-corner></dfn> = [left | right] || [top | bottom]
12051204
</pre>
12061205

@@ -1343,10 +1342,9 @@ Radial Gradients: the ''radial-gradient()'' notation {#radial-gradients}
13431342
See [[css-color-4#interpolation]].
13441343

13451344
<pre class=prod>
1346-
<dfn>radial-gradient()</dfn> = radial-gradient(
1347-
[ [ [ <<rg-ending-shape>> || <<rg-size>> ]? [ at <<position>> ]? ] || <<color-interpolation-method>>]? ,
1348-
<<color-stop-list>>
1349-
)
1345+
<dfn>&lt;radial-gradient-syntax></dfn> =
1346+
[ [ [ <<rg-ending-shape>> || <<rg-size>> ]? [ at <<position>> ]? ] || <<color-interpolation-method>>]? ,
1347+
<<color-stop-list>>
13501348
</pre>
13511349

13521350
<div class="example">
@@ -1422,10 +1420,10 @@ Conic Gradients: the ''conic-gradient()'' notation</h3>
14221420
The syntax for a conic gradient is:
14231421

14241422
<pre class='prod'>
1425-
<dfn>conic-gradient()</dfn> = conic-gradient(
1423+
<dfn>conic-gradient()</dfn> = conic-gradient( [ <<conic-gradient-syntax>> ] )
1424+
<dfn>&lt;conic-gradient-syntax></dfn> =
14261425
[ [ [ from <<angle>> ]? [ at <<position>> ]? ] || <<color-interpolation-method>> ]? ,
14271426
<<angular-color-stop-list>>
1428-
)
14291427
</pre>
14301428

14311429
The arguments are defined as follows:
@@ -1583,6 +1581,12 @@ Repeating Gradients: the ''repeating-linear-gradient()'', ''repeating-radial-gra
15831581
and are interpreted the same
15841582
as their respective non-repeating siblings defined previously.
15851583

1584+
<pre class=prod>
1585+
<dfn>&lt;repeating-conic-gradient()></dfn> = repeating-conic-gradient( [ <<conic-gradient-syntax>> ] )
1586+
<dfn>&lt;repeating-linear-gradient()></dfn> = repeating-linear-gradient( [ <<linear-gradient-syntax>> ] )
1587+
<dfn>&lt;repeating-radial-gradient()></dfn> = repeating-radial-gradient( [ <<radial-gradient-syntax>> ] )
1588+
</pre>
1589+
15861590
<div class=example>
15871591
Basic repeating conic gradient:
15881592

0 commit comments

Comments
 (0)