From 99ff48af83e80b08e3a4888d4118cbfede0169fb Mon Sep 17 00:00:00 2001 From: Sebastian Zartner Date: Wed, 9 Feb 2022 23:28:39 +0100 Subject: [PATCH 01/13] Added stripes() function to CSS Images 4 --- css-images-4/Overview.bs | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/css-images-4/Overview.bs b/css-images-4/Overview.bs index 5b3d12f7998..392ce3d665b 100644 --- a/css-images-4/Overview.bs +++ b/css-images-4/Overview.bs @@ -1117,7 +1117,45 @@ Cycle Detection any ''element()'' functions participating in the cycle are invalid images. + + +Stripes: the ''stripes()'' notation {#stripes-function} +---------------------------------------------------------------------- + + The ''stripes()'' function allows to define a number of stripes of + different colors with different widths. How those stripes are actually + painted depends on the context the function is used in. + + The syntax for ''stripes()'' is defined as: + +
+		stripes() = stripes( [ <> && [ <> | <>]? ]# )
+	
+ + The function represents a 1-dimensional image generated by a list + of colors and an optional thickness for each of them. + + A <> or <> value refers to the total length of the image + in the used context. + The <> must be between ''0%'' and ''100%'' inclusive; + any other value is invalid. + + If the thickness of a stripe is omitted, it is meant to be ''1fr''. + If the width of the context the function is used in exceeds the total + thickness of the stripes, the rest is painted transparent. I.e. it behaves + as if there were an additional last ''transparent'' stripe. + If the width of the context the function is used in is smaller than the + total thickness of the stripes, the stripes are clipped starting from the + last defined color. - -Stripes: the ''stripes()'' notation {#stripes-function} ----------------------------------------------------------------------- - - The ''stripes()'' function allows to define a number of stripes of - different colors with different widths. How those stripes are actually - painted depends on the context the function is used in. - - The syntax for ''stripes()'' is defined as: - -
-		stripes() = stripes( [ <> && [ <> | <>]? ]# )
-	
- - The function represents a 1-dimensional image generated by a list - of colors and an optional thickness for each of them. - - A <> or <> value refers to the total length of the image - in the used context. - The <> must be between ''0%'' and ''100%'' inclusive; - any other value is invalid. - - If the thickness of a stripe is omitted, it is meant to be ''1fr''. - - If the width of the context the function is used in exceeds the total - thickness of the stripes, the rest is painted transparent. I.e. it behaves - as if there were an additional last ''transparent'' stripe. - If the width of the context the function is used in is smaller than the - total thickness of the stripes, the stripes are clipped starting from the - last defined color. - 1D Image Values: the ''stripes()'' notation {#stripes} ====================================================== - Issue: Per WG resolution, - define the ''stripes()'' function - which creates a 1D image for use in borders/outlines. + The ''stripes()'' function allows to define a number of stripes of + different colors with different widths. + + The syntax for ''stripes()'' is defined as: + +
+		stripes() = stripes( [ <> && [ <> | <>]? ]# )
+	
+ + The function represents a 1-dimensional image generated by a list of colors + and an optional thickness for each of them. + + A <> or <> value refers to the total length of the image + in the used context. + The <> must be between ''0%'' and ''100%'' inclusive; + any other value is invalid. + + If the thickness of a stripe is omitted, it is interpreted as ''1fr''. + + If not defined differently by the context the function is used in, the + stripes are painted from top to bottom and tiled horizontally. If the size + of the painting area exceeds the total thickness of the stripes, the + remaining area is painted transparently. I.e. it behaves as if there was an + additional last ''transparent'' stripe. If the size of the painting area + is smaller than the total thickness of the stripes, the stripes are clipped + starting from the last defined color.