Re: Proposal: Motions along a path in CSS

On Thu, Sep 4, 2014 at 11:11 PM, Dirk Schulze <dschulze@adobe.com> wrote:
>> One downside I don't like is that you'd have to duplicate a possibly long path in an animation. e.g.
>>
>> from { transform: motion(<some path> 0%); }
>> to { transform: motion(<the same path> 100%); }
>>
>> If there are 30 keyframes it gets more ugly. Could we come up with a way to avoid this?
>
> In my proposal, I introduced new properties and you would specify the path once. The animated property that you have to repeat in the keyframes is the motion-position property with a length/percentage value.
>
> Shane proposed to have the motion() transform function as well to reorder with other transform functions.

Yeah, as long as you're using the property versions, rather than an
explicit transform list, you don't have to repeat anything.  Nice and
easy!

>> (Could CSS variables help? Define a shape/path somewhere and refer to it in the motion() function?)

Nope, can't use variables in animations.

~TJ

Received on Friday, 5 September 2014 19:37:50 UTC