web-animations / web-animations-js-legacy

The original emulator of the Web Animations specification. Please use web-animations-js instead:
https://github.com/web-animations/web-animations-js
Apache License 2.0
707 stars 84 forks source link

Keyframe animation 'offset' clashes with SVG 'offset' #638

Open karip opened 10 years ago

karip commented 10 years ago

Keyframe animation for a SVG gradient stop offset [1] can't be made, because there is a conflict in key names in the Animation object. Here’s how it would look like:

var player = document.timeline.play(new Animation(stopElement, 
    [ {offset: 0.5, offset: 0}, {offset: 0.3, offset: 1} ], 
    {duration: 6000}));

An issue related to this has been written in the Web Animation spec [2]:

The above algorithm gives special meaning to the property names 'offset', ’computedOffset', 'easing', and 'composite'. If a CSS property called ’offset' or 'composite' is ever introduced it will clash with the meaning here.

I believe the svg stop offset property already causes a clash.

[1] http://www.w3.org/TR/SVG/pservers.html#StopElementOffsetAttribute [2] http://dev.w3.org/fxtf/web-animations/#processing-a-keyframe-object