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

[css-images] color-stop position interpolation

From: Dirk Schulze <dschulze@adobe.com>
Date: Sun, 18 Aug 2013 23:15:33 -0700
To: www-style list <www-style@w3.org>
Message-ID: <7A2DEC8D-27D2-44E4-B2A4-12167E24E946@adobe.com>
Hi,

Since CSS gradients support <length> and <percentage> values for color stops, interpolation between color stops gets more complicated. While there isn't necessarily a problem with interpolation between two <length> values or two <percentage> values, interpolation between <length> and <percentage> does require layout information to calculate the gradient length. Some implementations might not be able to provide the layout information (especially the gradient size) at the time of the interpolation. This seems at least to be the case for WebKit and Blink. The layout information are available on drawing the gradient. Until then, the values must be generic and independent of the gradient size.

A possible solution could be to just allow animations between two <percentage> values and two <length> values. The animation on the <angle> component for linear gradients is not problematic because the keywords are fixed to certain angles. Animation of the components of the radial gradients have the same problem as color stops.

Greetings,
Dirk
Received on Monday, 19 August 2013 06:16:00 UTC

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