@@ -3535,29 +3535,40 @@ <h3 id=interpolating-image-combinations><span class=secno>7.2. </span>
35353535 < h3 id =interpolating-gradients > < span class =secno > 7.3. </ span > Interpolating
35363536 < a href ="#gradient-type "> < var > <gradient> </ var > </ a > </ h3 >
35373537
3538- < p class =issue > Redo this to actually work right with the current syntax.
3538+ < p class =issue > This section needs review and improvement. In particular, I
3539+ believe the handling of linear-gradient() is incomplete - I think we want
3540+ to specifically interpolate the "length" of the gradient line (the
3541+ distance between 0% and 100%) between the starting and ending positions
3542+ explicitly, so it doesn't grow and then shrink over a single animation.
35393543
35403544 < p > Gradient images can be interpolated directly in CSS transitions and
35413545 animations, smoothly animating from one gradient to another. There are
35423546 only a few restrictions on what gradients are allowed to be interpolated:
35433547
35443548 < ol >
35453549 < li > Both the starting and ending gradient must be expressed with the same
3546- function. (For example, you can transition from a linear-gradient() to a
3547- linear-gradient(), but not from a linear-gradient() to a
3548- radial-gradient() or a repeating-linear-gradient().)
3549-
3550- < li > Both the starting and ending gradient must have the same number of
3551- color-stops. For this purpose, a repeating gradient is considered to have
3552- infinite color-stops, and thus all repeating gradients have the same
3553- number of color-stops. (Note that one may pad a gradient with additional
3554- color-stops placed atop each other, if necessary to make two gradients
3555- have the same number of color-stops.)
3550+ function. (For example, you can transition from a ‘< code
3551+ class =css > linear-gradient()</ code > ’ to a ‘< code
3552+ class =css > linear-gradient()</ code > ’, but not from a ‘< code
3553+ class =css > linear-gradient()</ code > ’ to a ‘< code
3554+ class =css > radial-gradient()</ code > ’ or a ‘< code
3555+ class =css > repeating-linear-gradient()</ code > ’.)
3556+
3557+ < li > Both the starting and ending gradient must have the same number of < a
3558+ href ="#color-stop-type "> < var > <color-stop> </ var > </ a > s. For this
3559+ purpose, a repeating gradient is considered to have infinite < a
3560+ href ="#color-stop-type "> < var > <color-stop> </ var > </ a > s, and thus all
3561+ repeating gradients have the same number of < a
3562+ href ="#color-stop-type "> < var > <color-stop> </ var > </ a > s. (Note that one
3563+ may pad a gradient with additional < a
3564+ href ="#color-stop-type "> < var > <color-stop> </ var > </ a > s placed atop each
3565+ other, if necessary to make two gradients have the same number of < a
3566+ href ="#color-stop-type "> < var > <color-stop> </ var > </ a > s.)
35563567 </ ol >
35573568
35583569 < p > If the two gradients satisfy both of those constraints, they must be
35593570 interpolated as described below. If not, they must be interpolated as a
3560- generic image.
3571+ generic < a href =" # image-type " > < var > <image > </ var > </ a > .
35613572
35623573 < ol >
35633574 < li > Convert both the start and end gradients to their explicit forms:
@@ -3573,15 +3584,14 @@ <h3 id=interpolating-gradients><span class=secno>7.3. </span> Interpolating
35733584 [‘< code class =css > 0deg</ code > ’,‘< code
35743585 class =css > 360deg</ code > ’) that would produce an equivalent
35753586 rendering.
3576-
3577- < li > If both the start and end gradients had their direction specified
3578- with keywords, and the absolute difference between the angles their
3579- directions mapped to is greater than 180deg, add 360deg to the
3580- direction of the gradient with the smaller angle. < span
3581- class =note > This ensures that a transition from, for example, "to
3582- left" (270deg) to "to top" (0deg) rotates the gradient a quarter-turn
3583- clockwise, as expected, rather than rotating three-quarters of a turn
3584- counter-clockwise.</ span >
3587+ < p > If both the start and end gradients had their direction specified
3588+ with keywords, and the absolute difference between the angles their
3589+ directions mapped to is greater than 180deg, add 360deg to the
3590+ direction of the gradient with the smaller angle. < span
3591+ class =note > This ensures that a transition from, for example, "to
3592+ left" (270deg) to "to top" (0deg) rotates the gradient a
3593+ quarter-turn clockwise, as expected, rather than rotating
3594+ three-quarters of a turn counter-clockwise.</ span >
35853595 </ ul >
35863596
35873597 < dt > For radial gradients:
@@ -3594,7 +3604,10 @@ <h3 id=interpolating-gradients><span class=secno>7.3. </span> Interpolating
35943604
35953605 < li > Otherwise, the size must be changed to a pair of < a
35963606 href ="#radial-size-circle "> < var > <length> </ var > </ a > s that would
3597- produce an equivalent ending-shape.
3607+ produce an equivalent ending-shape. If the < a
3608+ href ="#shape "> < var > <shape> </ var > </ a > was specified as ‘< code
3609+ class =css > circle</ code > ’, change it to ‘< code
3610+ class =css > ellipse</ code > ’.
35983611 </ ul >
35993612 </ dl >
36003613
0 commit comments