W3C home > Mailing lists > Public > www-style@w3.org > August 2013

[css-images] transition of repeating gradients

From: Dirk Schulze <dschulze@adobe.com>
Date: Sat, 17 Aug 2013 22:37:22 -0700
To: www-style list <www-style@w3.org>
Message-ID: <8F23AB00-7594-4DCE-B89B-7AEF50F7EA9A@adobe.com>

The spec says to transition of repeating gradients[1]: 

Both the starting and ending gradient must have the same number of <color-stop>s. For this purpose, a repeating gradient is considered to have infinite <color-stop>s, and thus all repeating gradients have the same number of <color-stop>s. (Note that one may pad a gradient with additional <color-stop>s placed atop each other, if necessary to make two gradients have the same number of <color-stop>s.)

Could the spec instead define that the number of specified color stops per iteration between start and end gradient must match each other? I think it is confusing to say here that repeating gradients always have the same number of color stops. Otherwise implementations would need to support animations between all kind color stop lists for repeating gradients.

The note at the end actually suggest that implementations "add" color stops to the gradient so that the number of color stops match between start and end, while the first sentence requires the same length in the first place.
If implementations are required to add more color stops, where should they be added? At the end of the color stop list defined by the author? (So repeat the last color stop until the list length matches?) This often does not produce the expected result. You get transitions but they may not look nice.
 Reading it a second time (after writing the lines above), it sounds more like a note for authors. I suggest to remove the note and keep the first sentence or make it clear that this note is not for implementers. (Maybe s/Note that one/Note that authors/)


[1] http://dev.w3.org/csswg/css-images/#interpolating-gradients
Received on Sunday, 18 August 2013 05:37:45 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:33 UTC