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/Overview.bs
+13-33Lines changed: 13 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -709,13 +709,11 @@ Gradient Color-Stops</h3>
709
709
the position can be omitted in the syntax.
710
710
(It gets automatically filled in by the user agent; see below for details.)
711
711
712
-
Some <a>color stops</a> don't have a color,
713
-
only a position.
714
-
A <a>color stop</a> like this is a <dfn>color interpolation hint</dfn>,
712
+
Between two <a>color stops</a> there can be a <dfn local-title="color hint">color interpolation hint</dfn>,
715
713
which specifies how the colors of the two <a>color stops</a> on either side
716
714
should be interpolated in the space between them
717
715
(by default, they interpolate linearly).
718
-
There can only be at most one <a>color interpolation hint</a> between any two given normal <a>color stops</a>;
716
+
There can only be at most one <a>color interpolation hint</a> between any two given <a>color stops</a>;
719
717
using more than that makes the function invalid.
720
718
721
719
Color stops are organized into a <dfn export>color stop list</dfn>,
@@ -724,29 +722,27 @@ Gradient Color-Stops</h3>
724
722
must have a color
725
723
(though their position can be omitted).
726
724
727
-
<a>Color stops</a> are placed on a <a>gradient line</a>,
725
+
<a>Color stops</a>and <a>color hints</a>are placed on a <a>gradient line</a>,
728
726
which defines the colors at every point of a gradient.
729
727
The gradient function defines the shape and length of the <a>gradient line</a>,
730
728
along with its <a>starting point</a> and <a>ending point</a>.
731
729
732
-
<a>Color stops</a> must be specified in order.
730
+
<a>Color stops</a>and <a>color hints</a>must be specified in order.
733
731
Percentages refer to the length of the <a>gradient line</a> between the <a>starting point</a> and <a>ending point</a>,
734
732
with 0% being at the starting point
735
733
and 100% being at the ending point.
736
734
Lengths are measured from the <a>starting point</a> in the direction of the <a>ending point</a> along the <a>gradient line</a>.
737
735
Angles are measured with 0deg pointing up,
738
736
and positive angles corresponding to clockwise rotations from there.
739
737
740
-
<a>Color stops</a> are usually placed between the <a>starting point</a> and <a>ending point</a>,
738
+
<a>Color stops</a>and <a>color hints</a>are usually placed between the <a>starting point</a> and <a>ending point</a>,
741
739
but that's not required;
742
740
the gradient line extends infinitely in both directions,
743
-
and a <a>color stop</a> can be placed at any position on the <a>gradient line</a>.
741
+
and a <a>color stop</a>or <a>color hint</a>can be placed at any position on the <a>gradient line</a>.
744
742
745
743
A <a>color stop</a> with two locations is mostly equivalent
746
744
to specifying two <a>color stops</a> with the same color,
747
745
one for each position.
748
-
However, if the color is omitted,
749
-
it's treated as a single <a>color stop</a> by step 4 in the clean-up algorithm below.
750
746
<span class='note'>Specifying two locations makes it easier to create solid-color "stripes" in a gradient,
751
747
without having to repeat the color twice.</span>
752
748
@@ -756,17 +752,9 @@ Gradient Color-Stops</h3>
756
752
If multiple stops in a row lack a position,
757
753
they space themselves out equally.
758
754
759
-
Similarly, the color of a <a>color stop</a> can be omitted.
760
-
The causes the <em>color</em> to be automatically computed
761
-
to halfway between the two surrounding stops,
762
-
so that the "midpoint" of a transition can be easily adjusted.
763
-
If multiple stops in a row lack a color,
764
-
they space themselves out equally in "color space",
765
-
giving more control over the smoothness of the transition.
766
-
767
-
The following steps must be applied <em>in order</em> to process the list of <a>color stops</a>.
755
+
The following steps must be applied <em>in order</em> to process the <<color-stop-list>>.
768
756
After applying these rules,
769
-
all <a>color stops</a> will have a definite position and color
757
+
all <a>color stops</a>and <a>color hints</a>will have a definite position and color (if appropriate)
770
758
and they will be in ascending order:
771
759
772
760
<ol>
@@ -777,21 +765,13 @@ Gradient Color-Stops</h3>
777
765
set its position to 100%.
778
766
779
767
<li>
780
-
If a <a>color stop</a> has a position that is less than the specified position of any <a>color stop</a> before it in the list,
781
-
set its position to be equal to the largest specified position of any <a>color stop</a> before it.
768
+
If a <a>color stop</a>or <a>color hint</a>has a position that is less than the specified position of any <a>color stop</a> or <a>color hint</a> before it in the list,
769
+
set its position to be equal to the largest specified position of any <a>color stop</a>or <a>color hint</a>before it.
782
770
783
771
<li>
784
772
If any <a>color stop</a> still does not have a position,
785
773
then, for each run of adjacent <a>color stops</a> without positions,
786
774
set their positions so that they are evenly spaced between the preceding and following <a>color stops</a> with positions.
787
-
788
-
<li>
789
-
If any <a>color stop</a> does not have a color,
790
-
then, for each run of adjacent <a>color stops</a> without colors,
791
-
set their colors to be evenly spaced linear interpolations in premultiplied sRGBA space
792
-
between the preceding and following <a>color stops</a> with colors.
793
-
Note that a <a>color stop</a> with two positions is still counted as a single <a>color stop</a> by this step,
794
-
so both positions will be assigned the same color.
795
775
</ol>
796
776
797
777
<p class='issue'>
@@ -815,21 +795,21 @@ Gradient Color-Stops</h3>
815
795
at 25%, 50%, or 75% of the distance between two <a>color stops</a>,
816
796
the color is a 25%, 50%, or 75% blend of the colors of the two stops.
817
797
818
-
However, if a <a>color interpolation hint</a> was provided between two <a>color stops</a>,
798
+
However, if a <a>color hint</a> was provided between two <a>color stops</a>,
819
799
the interpolation is non-linear,
820
800
and controlled by the hint:
821
801
822
802
<ol>
823
803
<li>
824
-
Determine the location of the hint as a percentage of the distance between the two <a>color stops</a>,
804
+
Determine the location of the <a>color hint</a> as a percentage of the distance between the two <a>color stops</a>,
825
805
denoted as a number between 0 and 1,
826
806
where 0 indicates the hint is placed right on the first <a>color stop</a>,
827
807
and 1 indicates the hint is placed right on the second <a>color stop</a>.
828
808
Let this percentage be <var>H</var>.
829
809
830
810
<li>
831
811
For any given point between the two color stops,
832
-
determine the point's location as a percetnage of the distance between the two <a>color stops</a>,
812
+
determine the point's location as a percentage of the distance between the two <a>color stops</a>,
0 commit comments