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
<p>The first argument to the function specifies the <dfn>gradient-line</dfn>,
524
+
<p>The first argument to the function specifies the <dfn>gradientline</dfn>,
525
525
which gives the gradient a direction and determines how color-stops are
526
526
positioned. It may be omitted; if so, it defaults to "to bottom".</p>
527
527
528
-
<p>The <i>gradient-line</i> may be specified in two different ways. The
529
-
first is by specifying the angle the <i>gradient-line</i> should assume;
528
+
<p>The <i>gradientline</i> may be specified in two different ways. The
529
+
first is by specifying the angle the <i>gradientline</i> should assume;
530
530
for the purposes of this argument, 0deg points upwards, 90deg points toward
531
531
the right, and positive angles go clockwise.
532
-
The starting-point and ending-point of the <i>gradient-line</i> are
532
+
The starting-point and ending-point of the <i>gradientline</i> are
533
533
determined by extending a line in both directions from the center of the
534
534
<i>gradient box</i> at the angle specified. In the direction of the angle, the ending-point
535
-
is the point on the <i>gradient-line</i> where a line drawn perpendicular
536
-
to the <i>gradient-line</i> would intersect the corner of the <i>gradient box</i> in that
535
+
is the point on the <i>gradientline</i> where a line drawn perpendicular
536
+
to the <i>gradientline</i> would intersect the corner of the <i>gradient box</i> in that
537
537
direction. The starting-point is determined identically, except in the
538
538
opposite direction of the angle.</p>
539
539
540
-
<p>Alternately, the direction may be specified with keywords that denote the direction. If the argument is ''to top'', ''to right'', ''to bottom'', or ''to left'', the gradient must be rendered identically to ''0deg'', ''90deg'', ''180deg'', or ''270deg'', respectively. If the argument specifies a corner to angle towards, the gradient must be rendered identically to an angle-based gradient with an angle chosen such that the endpoint of the gradient is in the same quadrant as the indicated corner, and a line drawn perpendicular to the gradient-line through the center of the <i>gradient box</i> intersects the two neighboring corners.</p>
540
+
<p>Alternately, the direction may be specified with keywords that denote the direction. If the argument is ''to top'', ''to right'', ''to bottom'', or ''to left'', the gradient must be rendered identically to ''0deg'', ''90deg'', ''180deg'', or ''270deg'', respectively. If the argument specifies a corner to angle towards, the gradient must be rendered identically to an angle-based gradient with an angle chosen such that the endpoint of the gradient is in the same quadrant as the indicated corner, and a line drawn perpendicular to the gradientline through the center of the <i>gradient box</i> intersects the two neighboring corners.</p>
541
541
542
542
<pclass='note'>It is expected that the next level of this module will provide the ability to define the gradient's direction relative to the current text direction and writing-mode.</p>
543
543
544
544
<p>
545
545
546
546
<divclass=example>
547
547
<divstyle="overflow: hidden">
548
-
<imgstyle="float: right; margin-left: 1em;" src='gradient-diagram.png' alt="[An image showing a box with a background shading gradually from white in the bottom-left corner to black in the top-right corner. There is a line, illustrating the gradient-line, angled at 45 degrees and passing through the center of the box. The starting-point and ending-point of the gradient-line are indicated by the intersection of the gradient-line with two additional lines that pass through the bottom-left and top-right corners of the box.]">
548
+
<imgstyle="float: right; margin-left: 1em;" src='gradient-diagram.png' alt="[An image showing a box with a background shading gradually from white in the bottom-left corner to black in the top-right corner. There is a line, illustrating the gradientline, angled at 45 degrees and passing through the center of the box. The starting-point and ending-point of the gradientline are indicated by the intersection of the gradientline with two additional lines that pass through the bottom-left and top-right corners of the box.]">
549
549
<p>This example illustrates visually how to calculate the
550
-
<i>gradient-line</i> from the rules above. This shows the starting
551
-
and ending-point of the <i>gradient-line</i>, along with the actual
550
+
<i>gradientline</i> from the rules above. This shows the starting
551
+
and ending-point of the <i>gradientline</i>, along with the actual
<p>This demonstrates the use of an angle in the gradient. Note that, though the angle is not exactly the same as the angle between the corners, the <i>gradient-line</i> is still sized so as to make the gradient yellow exactly at the upper-left corner, and blue exactly at the lower-right corner.</p>
591
+
<p>This demonstrates the use of an angle in the gradient. Note that, though the angle is not exactly the same as the angle between the corners, the <i>gradientline</i> is still sized so as to make the gradient yellow exactly at the upper-left corner, and blue exactly at the lower-right corner.</p>
<p>Color-stops are placed on a <dfn>gradient-ray</dfn>, similar to the <i>gradient-line</i> of linear gradients. The <i>gradient-ray</i> is anchored at the center of the gradient and extends toward the right. The 0% location is at the start of the <i>gradient-ray</i>, and the 100% location is on the point where the <i>gradient-ray</i> intersects the <i>ending shape</i>. Negative locations can be specified; though negative locations are never directly consulted for rendering, they can affect the color of non-negative locations on the <i>gradient-ray</i> through interpolation. For example, ''radial-gradient(red -50px, yellow 100px)'' produces an elliptical gradient that starts with a reddish-orange color in the center (specifically, #f50) and transitions to yellow. Locations greater than 100% simply specify a location a correspondingly greater distance from the center of the gradient.</p>
748
+
<p>Color-stops are placed on a <dfn>gradientray</dfn>, similar to the <i>gradientline</i> of linear gradients. The <i>gradientray</i> is anchored at the center of the gradient and extends toward the right. The 0% location is at the start of the <i>gradientray</i>, and the 100% location is on the point where the <i>gradientray</i> intersects the <i>ending shape</i>. Negative locations can be specified; though negative locations are never directly consulted for rendering, they can affect the color of non-negative locations on the <i>gradientray</i> through interpolation. For example, ''radial-gradient(red -50px, yellow 100px)'' produces an elliptical gradient that starts with a reddish-orange color in the center (specifically, #f50) and transitions to yellow. Locations greater than 100% simply specify a location a correspondingly greater distance from the center of the gradient.</p>
749
749
750
-
<p>When drawing the concentric ellipses of the gradient, the color of each ellipse is the color of the <i>gradient-ray</i> at the point where the ellipse intersects the ray.</p>
750
+
<p>When drawing the concentric ellipses of the gradient, the color of each ellipse is the color of the <i>gradientray</i> at the point where the ellipse intersects the ray.</p>
0 commit comments