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

Re: [css-images] color stops transition

From: Dirk Schulze <dschulze@adobe.com>
Date: Tue, 3 Sep 2013 22:48:32 -0700
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: www-style list <www-style@w3.org>
Message-ID: <A30146D2-E292-4BF6-9E41-A103D6A410D8@adobe.com>

On Sep 3, 2013, at 5:18 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:

> On Tue, Sep 3, 2013 at 3:39 AM, Dirk Schulze <dschulze@adobe.com> wrote:
>> On Aug 19, 2013, at 11:21 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>>> On Sun, Aug 18, 2013 at 12:29 AM, Dirk Schulze <dschulze@adobe.com> wrote:
>>>> Hi,
>>>> 
>>>> There is a post processing step that "orders" color stops if a user specifies them out of order. This creates the actual list of color stops[1].
>>>> 
>>>> ""
>>>> The following steps must be applied in order to process the list of color stops
>>>> ""
>>>> 
>>>> The paragraph about interpolation says[2]:
>>>> 
>>>> ""
>>>> Interpolate each component and color-stop of the gradients independently.
>>>> ""
>>>> 
>>>> Is this animation done on the post processed color stops, or the specified color stops?
>>> 
>>> Sorry, this is unclear in the spec.  The intention is that you process
>>> the stops first, then interpolate the processed positions.  I think
>>> this then requires you to do step 2 of the fixup *again*, as I believe
>>> the stops can get misordered during the transition.
>> 
>> If you require to order color stops before you interpolate, then you implicitly require to have layout happen at this time as well. To order color stops, you need to know the gradient length.
> 
> Indeed.  Thus, my (and Shane's) longstanding suggestion that we swap
> steps 2 and 3, and only perform the new step 3 at layout time.

I am not sure if that helps avoiding the problem of depending layout at all. You still have color-stops without position like:

 linear-gradient(red 20px, blue, green 80%);

blue must be positioned with equal distance to green and red. This as well requires information about gradient length and therefore layout information. Without these information, you can not animate the position of blue properly.

Note that as far as I am aware of, neither WebKit/Blink nor Gecko have (reliable) layout information at this point. 

> Like I
> said in another thread earlier, I think we rejected this earlier
> because everyone was just burned out on gradients tweaking and wanted
> to settle the spec.  I think we could fix it now.  I'll bring it up on
> the call.

Thanks, I also added am agenda item for interpolation of images in general to the Paris F2F (which includes gradients).

Greetings,
Dirk

> 
> ~TJ
Received on Wednesday, 4 September 2013 05:48:58 UTC

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