@@ -1923,7 +1923,8 @@ Color Stop “Fixup”</h4>
1923
1923
1924
1924
<pre class=prod>
1925
1925
<dfn><1d-image></dfn> = <<stripes()>>
1926
- <dfn>stripes()</dfn> = stripes( [ <<color>> && [ <<length-percentage>> | <<flex>> ]? ]# )
1926
+ <dfn>stripes()</dfn> = stripes( <<color-stripe>> # )
1927
+ <dfn><color-stripe></dfn> = <<color>> && [ <<length-percentage>> | <<flex>> ]?
1927
1928
</pre>
1928
1929
1929
1930
The ''stripes()'' function defines a 1d-image
@@ -1969,19 +1970,18 @@ Color Stop “Fixup”</h4>
1969
1970
and ensures smoothly continuous behavior
1970
1971
as the <<flex>> values approach zero.)
1971
1972
</div>
1972
-
1973
-
1973
+
1974
1974
The |painting area| is defined by the context in which the ''stripes()'' function is used.
1975
1975
If used generically as an <<image>> ,
1976
1976
the |painting area| is the height of the [=concrete image size=] .
1977
-
1977
+
1978
1978
If the sum thickness of the stripes is smaller than the |painting area|,
1979
1979
the [=paint line=] is [=transparent black=] for its remaining length,
1980
1980
as if a final ''transparent'' argument were given.
1981
1981
If the sum thickness is larger,
1982
1982
any stripes or portions thereof that would be past the end of the [=paint line=] have no effect.
1983
1983
1984
- The computed value of this function is the [=specified value=]
1984
+ The computed value of this function is the [=specified value=]
1985
1985
with all <<color>> s computed
1986
1986
and all <<length-percentage>> s absolutized and computed to the extent possible.
1987
1987
@@ -2471,6 +2471,39 @@ Interpolating <<gradient>> {#interpolating-gradients}
2471
2471
Then, for each pair of color-stops,
2472
2472
interpolate the position and color independently.
2473
2473
2474
+ Interpolating <<1d-image>> {#interpolating-1d-images}
2475
+ -----------------------------------------------
2476
+
2477
+ Similar to <a lt="interpolating-gradients">gradient images</a> ,
2478
+ one-dimensional images can be interpolated directly in CSS transitions and animations,
2479
+ smoothly animating from one image to another.
2480
+ There are only a few restrictions on what images are allowed to be interpolated:
2481
+
2482
+ 1. Both the starting and ending image must have the same number of <<color-stripe>> s.
2483
+
2484
+ 2. Neither image uses a combination of <<length>> , <<percentage>> , and <<flex>> stripes.
2485
+
2486
+ If the two image satisfy both constraints,
2487
+ they must be interpolated as described below.
2488
+ If they fail the second one only,
2489
+ they must be abruptly transitioned at 50%
2490
+ (unless otherwise specified by a future specification).
2491
+ If they fail the first constraint,
2492
+ they must be interpolated using ''cross-fade()''
2493
+ as for generic images.
2494
+
2495
+ Note: The abrupt transition at 50% is so that content will not rely on cross-fading,
2496
+ and smarter interpolation rules can be added for this case in the future.
2497
+
2498
+ 1. Interpolate each component and stripe of the images independently.
2499
+
2500
+ 2. To interpolate a stripe,
2501
+ first match each stripe in the start image
2502
+ to the corresponding stripe at the same index in the end image.
2503
+ Then, for each pair of stripes,
2504
+ interpolate the <a href="https://www.w3.org/TR/css3-transitions/#animtype-length">thickness</a>
2505
+ and <a href="https://www.w3.org/TR/css3-transitions/#animtype-color">color</a> independently.
2506
+
2474
2507
<!--
2475
2508
██████ ████████ ████████ ████ ███ ██ ████ ████████ ███ ████████ ████ ███████ ██ ██
2476
2509
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██
0 commit comments