You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css-images-4/Overview.bs
+91-11Lines changed: 91 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -572,14 +572,16 @@ Gradients</h2>
572
572
<h3 id='conic-gradients'>
573
573
Conic Gradients: the ''conic-gradient()'' notation</h3>
574
574
575
+
576
+
575
577
A conic gradient starts by specifying the center of a circle,
576
578
similar to radial gradients,
577
579
except that conic gradient color-stops are placed <em>around</em> the circumference of the circle,
578
580
rather than on a line emerging from the center,
579
581
causing the color to smoothly transition as you spin around the center,
580
582
rather than as you progress outward from the center.
581
583
582
-
A conic gradient is specified by indicating the center of the gradient,
584
+
A conic gradient is specified by indicating a rotation angle, the center of the gradient,
583
585
and then specifying a list of color-stops.
584
586
Unlike linear and radial gradients,
585
587
whose color-stops are placed by specifying a <<length>>,
@@ -590,6 +592,16 @@ Conic Gradients: the ''conic-gradient()'' notation</h3>
590
592
Note: These gradients are called "conic" or "conical"
591
593
because, if the color stops are chosen to be significantly lighter on one side than the other,
592
594
it produces a pattern that looks like a cone observed from above.
595
+
They are also known as "angle" gradients in some contexts,
596
+
since they are produced by varying the rotation angle of a ray.
597
+
598
+
<div class=example>
599
+
<div style="overflow: hidden">
600
+
<img style="float: right; margin-left: 1em;" src='images/conic-diagram.png' alt="[An image showing a box with a background shading gradually clockwise from white to black, starting from the top. A gradient circle is shown, and the colors at 0 and 216 degrees respectively.]">
601
+
602
+
This example visually illustrates how conic-gradient(at 25% 30%, white, black 60%) would be drawn. Note that since color stop positions always resolve to angles, the only effect of the center center is a 2D translation of the gradient, i.e. it does not affect how the gradient is drawn.
603
+
</div>
604
+
</div>
593
605
594
606
<h4 id='conic-gradient-syntax' class='no-toc'>
595
607
''conic-gradient()'' Syntax</h4>
@@ -598,16 +610,28 @@ Conic Gradients: the ''conic-gradient()'' notation</h3>
598
610
599
611
<pre class='prod'>
600
612
<dfn>conic-gradient()</dfn> = conic-gradient(
601
-
[ at <<position>>, ]?
613
+
[ from <<angle>> ]? [ at <<position>>]?,
602
614
<<angular-color-stop-list>>
603
615
)
604
616
</pre>
605
617
606
-
The <<position>> argument is defined in [!CSS3VAL],
607
-
and is resolved using the center-point as the object area
0 commit comments