Re: Animating SVG attributes from Web Animations

On Tue, Jun 16, 2015 at 4:46 PM Dirk Schulze <dschulze@adobe.com> wrote:

>  On Jun 16, 2015, at 7:16 AM, Shane Stephens <shans@google.com> wrote:
>
>   Shall WebAnimation also animate HTML attributes at some point?
>
>
>  I don't know. We've talked in the past about animating class. I'd also
> like to be able to animate scroll offsets at some point.
>
>
>> If yes, shall these attributes be “html” prefixed as well?
>
>
>  Yes. I think that would make sense.
>
>
>> What happens with the “svg*” attribute animation once we promoted the
>> attribute to a CSS property/ presentation attribute?
>>
>
>  * If the promotion matches the syntax and name, then animating either
> svgFoo or foo will produce identical results.
> * If the promition matches the syntax, but the name foo becomes bar when
> promoted, then animating svgFoo and animating bar will produce identical
> results.
> etc..
>
>
>  What about the CSS properties width/height and the width/height
> attributes on an HTMLCanvasElement? Both can be applied at the same time
> and may have different meanings. I assume that this would justify the html*
> prefix but we would end up with a svgWidth and htmlWidth animation
> attribute.
>

Yes, these would also be properties that we would want to provide with an
html prefix, if we choose to make them animatable. I'm not aware of any
plans to do so right now though.


> Is there maybe a way to explicitly state that you want to animate a
> property or an attribute? In case of a presentation attribute it would
> always fallback to the property? Similar to “attributeType”[1] in SVG
> animations?
>

svg/html as a prefix is an example of an explicit way :) Happy to consider
others too. Do you have some ideas?

Note that it's probably a bad idea to restrict a single animation to only
property animation or only attribute animation, because future promotion of
attributes might then lead to the need for a large-scale refactor.

Cheers,
    -Shane


> Greetings,
> Dirk
>
>  [1] http://www.w3.org/TR/SVG/animate.html#AttributeTypeAttribute
>
>
>  Cheers,
>     -Shane
>
>
>> Dirk
>>
>> >
>> > Cheers,
>> >     -Shane
>>
>>

Received on Tuesday, 16 June 2015 07:35:52 UTC