W3C home > Mailing lists > Public > www-style@w3.org > March 2010

Re: transitions vs. animations

From: Simon Fraser <smfr@me.com>
Date: Fri, 19 Mar 2010 16:58:51 -0700
Cc: www-style@w3.org
Message-id: <939AB2DF-4FF5-41C0-AA83-0BC542B76041@me.com>
To: "L. David Baron" <dbaron@dbaron.org>
On Mar 19, 2010, at 4:49 PM, L. David Baron wrote:

> On Friday 2010-03-19 16:22 -0700, Simon Fraser wrote:
>> Tying transitions and animations together would very much restrict the flexibility of both,
>> and unnecessarily constrain what authors can do.
> 
> I'm not sure that it's that constraining.
> 
> For example, I could imagine merging the properties as follows:
> 
> * combine animation-name and transition-property using a functional
>   syntax, like:
>     animation-???: transition(color), keyframes(wobble)
>   where 'animation-???: transition(color)' == 'transition-property: color'
>   and 'animation-???: keyframes(wobble)' == 'animation-name: wobble'
> 
> * make animation-duration, animation-delay, and
>   animation-timing-function (and maybe also animation-play-state,
>   if it's kept) apply to both types of animations (keyframe and
>   transition)

But this prevents you from using a different duration for the transition and
animation. Currently, animation-duration is the duration of one cycle of
animation, so you wouldn't be able to easily describe repeating animations that
need to coordinate with a transition.

It would be possible to have animation-duration describe the total
length of the animation, but then the author would have to deal with
computing how many iterations they want, and we'd have to consider
how to truncate the last keyframe.

Simon
Received on Friday, 19 March 2010 23:59:24 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:25 GMT