W3C home > Mailing lists > Public > www-style@w3.org > April 2016

Re: [css-images] Negative implications of linear gradient color space choice in CSS

From: Sebastian Zartner <sebastianzartner@gmail.com>
Date: Sun, 10 Apr 2016 14:45:54 +0200
Message-ID: <CAERejNZR3woOpuRzOfRMe94xgEq2P7pcTjascu3W5mx1i4bTBw@mail.gmail.com>
To: Mark Straver <mark@wolfbeast.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Rik Cabanier <cabanier@gmail.com>, Xidorn Quan <quanxunzhen@gmail.com>, Simon Fraser <smfr@me.com>, www-style list <www-style@w3.org>
On 9 April 2016 at 02:17, Mark Straver <mark@wolfbeast.com> wrote:
>
> Hey Folks,
>
> On 09/04/2016 01:12, Sebastian Zartner wrote:
> >> This has multiple, significant effects on animation, too.
> >> "transparent" is no longer an animatable value (impossible to smoothly
> >> move from it to any other color), so any gradient using "transparent"
> >> stops being animatable too. To make it animatable, you have to
> >> manually put in the two RGBA steps, which means you have to double-up
> >> that step for any other gradient you're animating with this one.
> >
> > The same rules for gradient color transitions apply to animations. So
> > it would still be animatable.
> > Reusing the example from above the transtion between the colors would
> > be rgba(255,0,0,1) @ 0% -> rgba(255,0,0,0) @ 50% -> rgba(0,0,255,0) @
> > 50% -> rgba(0,0,255,1) @ 100% for an animation like this:
> >
> [snip]
>
> I think Tab's main objection is that a transparent stop itself (especially
> when "in the middle") would be more difficult to animate to another
> (not-transparent) color because it would influence the surrounding gradients
> rather sharply.

Note that I was talking about animating plain colors, not gradients.
Of course animating gradients requires more math when 'transparent' is
special-cased, though it isn't that complicated either.

Sebastian
Received on Sunday, 10 April 2016 12:46:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:02 UTC