W3C home > Mailing lists > Public > www-svg@w3.org > August 2015

Re: [css-transitions] Animation of paint servers

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 13 Aug 2015 14:19:39 -0700
Message-ID: <CAAWBYDBvixRuLuWdZXJ6cv4TQLRX+ZJPDDDPcp62bAtf77ZTtw@mail.gmail.com>
To: Amelia Bellamy-Royds <amelia.bellamy.royds@gmail.com>
Cc: "L. David Baron" <dbaron@dbaron.org>, "www-style@w3.org list" <www-style@w3.org>, "www-svg@w3.org list" <www-svg@w3.org>, Dirk Schulze <dschulze@adobe.com>
On Wed, Aug 12, 2015 at 4:23 PM, Amelia Bellamy-Royds
<amelia.bellamy.royds@gmail.com> wrote:
> I do not know of any user agent that has implemented transitions from one
> SVG gradient to another (except by animating the SVG gradient <stop>
> elements themselves), so changing the draft text should not be problematic.
>
> (I don't have an Apple device to test with at the moment; if someone wants
> to give it a go to confirm please let us know.)
>
> The SMIL behavior was to animate changes in a url(#paint) reference in
> discrete switches.  Many implementations are currently buggy even doing
> that, and I'm not sure whether any do it for CSS animations/transitions yet
> (i.e., whether they animate it in the sense that the change is affected by a
> transition delay or step function, or applies at all when specified in
> keyframes).
>
> As much as it sounds nice to be able to transition between SVG gradients, I
> agree with the arguments relating to the lack of specifiable intermediate
> values.  The only way you could define an intermediate value would be if you
> mapped both initial and final SVG gradients to CSS gradient functions and
> transitioned the functions.  That is currently not practical because there
> are features of SVG gradients which cannot yet be represented in CSS
> gradient functions.  It also just sounds like an implementation headache:
> what if the DOM or styles for the SVG gradient elements were also changing?

Nah, they'd just fall into the generic <image> bucket, and
cross-fading between animated elements is well-defined.

> I like the idea of applying cross-fade transitions to SVG paint server
> content.  That should address most use cases with acceptably smooth results.
> It may be worth discussing how the scaling as well as fading transition
> would apply to an SVG pattern (i.e., is it treated as a single image or a
> tiled image? if tiled, how do you incorporate pattern transformations?).

Nothing special needs to be done for transitioning - it falls out of
CSS's handling of SVG paint servers.  And that's defined by the Images
4 spec.

~TJ
Received on Thursday, 13 August 2015 21:20:28 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:41 UTC