@@ -72,7 +72,7 @@ Value Definitions {#values}
72
72
or <a section href="#gradients">gradient notation</a> .
73
73
Its syntax is:
74
74
75
- <pre class="prod"><dfn><image></dfn> = <<url>> | <<image()>> | <<image-set()>> | <<cross-fade()>> | <<element()>> | <<gradient>> </pre>
75
+ <pre class="prod"><dfn><image></dfn> = <<url>> | <<image()>> | <<image-set()>> | <<cross-fade()>> | <<element()>> | <<gradient>> | <<stripes()>> </pre>
76
76
77
77
An <<image>> can be used in many CSS properties,
78
78
including the 'background-image' , 'list-style-image' , 'cursor' properties [[!CSS2]]
@@ -1116,47 +1116,6 @@ Cycle Detection</h4>
1116
1116
If the graph contains a cycle,
1117
1117
any ''element()'' functions participating in the cycle are <a>invalid images</a> .
1118
1118
1119
-
1120
- <!--
1121
- ██████ ████████ ████████ ████ ████████ ███████ ██████ ███ ███
1122
- ██ ██ ██ ██ ██ ██ ██ ██ █ ██ ██ ██ ██
1123
- ██ ██ ██ ██ ██ ██ ██ █ ██ ██ ██
1124
- ██████ ██ ████████ ██ ████████ █████ ██████ ██ ██
1125
- ██ ██ ██ ██ ██ ██ █ ██ ██ ██
1126
- ██ ██ ██ ██ ██ ██ ██ █ ██ ██ ██ ██
1127
- ██████ ██ ██ ██ ████ ██ ███████ ██████ ███ ███
1128
- -->
1129
-
1130
- Stripes: the ''stripes()'' notation {#stripes-function}
1131
- ----------------------------------------------------------------------
1132
-
1133
- The ''stripes()'' function allows to define a number of stripes of
1134
- different colors with different widths. How those stripes are actually
1135
- painted depends on the context the function is used in.
1136
-
1137
- The syntax for ''stripes()'' is defined as:
1138
-
1139
- <pre class=prod>
1140
- <dfn>stripes()</dfn> = stripes( [ <<color>> && [ <<length-percentage>> | <<flex>> ]? ]# )
1141
- </pre>
1142
-
1143
- The function represents a 1-dimensional image generated by a list
1144
- of colors and an optional thickness for each of them.
1145
-
1146
- A <<percentage>> or <<flex>> value refers to the total length of the image
1147
- in the used context.
1148
- The <<percentage>> must be between ''0%'' and ''100%'' inclusive;
1149
- any other value is invalid.
1150
-
1151
- If the thickness of a stripe is omitted, it is meant to be ''1fr'' .
1152
-
1153
- If the width of the context the function is used in exceeds the total
1154
- thickness of the stripes, the rest is painted transparent. I.e. it behaves
1155
- as if there were an additional last ''transparent'' stripe.
1156
- If the width of the context the function is used in is smaller than the
1157
- total thickness of the stripes, the stripes are clipped starting from the
1158
- last defined color.
1159
-
1160
1119
<!--
1161
1120
██████ ████████ ███ ████████ ████ ████████ ██ ██ ████████ ██████
1162
1121
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██ ██ ██ ██
@@ -1935,15 +1894,45 @@ Color Stop “Fixup”</h4>
1935
1894
</pre>
1936
1895
</div>
1937
1896
1938
-
1939
-
1897
+ <!--
1898
+ ██████ ████████ ████████ ████ ████████ ███████ ██████ ███ ███
1899
+ ██ ██ ██ ██ ██ ██ ██ ██ █ ██ ██ ██ ██
1900
+ ██ ██ ██ ██ ██ ██ ██ █ ██ ██ ██
1901
+ ██████ ██ ████████ ██ ████████ █████ ██████ ██ ██
1902
+ ██ ██ ██ ██ ██ ██ █ ██ ██ ██
1903
+ ██ ██ ██ ██ ██ ██ ██ █ ██ ██ ██ ██
1904
+ ██████ ██ ██ ██ ████ ██ ███████ ██████ ███ ███
1905
+ -->
1940
1906
1941
1907
1D Image Values: the ''stripes()'' notation {#stripes}
1942
1908
======================================================
1943
1909
1944
- Issue: <a href="https://github.com/w3c/csswg-drafts/issues/2532">Per WG resolution</a> ,
1945
- define the ''stripes()'' function
1946
- which creates a 1D image for use in borders/outlines.
1910
+ The ''stripes()'' function allows to define a number of stripes of
1911
+ different colors with different widths.
1912
+
1913
+ The syntax for ''stripes()'' is defined as:
1914
+
1915
+ <pre class=prod>
1916
+ <dfn>stripes()</dfn> = stripes( [ <<color>> && [ <<length-percentage>> | <<flex>> ]? ]# )
1917
+ </pre>
1918
+
1919
+ The function represents a 1-dimensional image generated by a list of colors
1920
+ and an optional thickness for each of them.
1921
+
1922
+ A <<percentage>> or <<flex>> value refers to the total length of the image
1923
+ in the used context.
1924
+ The <<percentage>> must be between ''0%'' and ''100%'' inclusive;
1925
+ any other value is invalid.
1926
+
1927
+ If the thickness of a stripe is omitted, it is interpreted as ''1fr'' .
1928
+
1929
+ If not defined differently by the context the function is used in, the
1930
+ stripes are painted from top to bottom and tiled horizontally. If the size
1931
+ of the painting area exceeds the total thickness of the stripes, the
1932
+ remaining area is painted transparently. I.e. it behaves as if there was an
1933
+ additional last ''transparent'' stripe. If the size of the painting area
1934
+ is smaller than the total thickness of the stripes, the stripes are clipped
1935
+ starting from the last defined color.
1947
1936
1948
1937
<!--
1949
1938
██████ ████ ████████ ████ ██ ██ ██████
0 commit comments