Re: [css-transitions] Animation of paint servers

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:26 UTC