W3C home > Mailing lists > Public > www-style@w3.org > April 2011

Re: [css3-animations] multiple 'animation-name' and cascading

From: L. David Baron <dbaron@dbaron.org>
Date: Mon, 11 Apr 2011 21:09:16 -0700
To: Dean Jackson <dino@apple.com>
Cc: www-style@w3.org
Message-ID: <20110412040916.GA14449@pickering.dbaron.org>
On Saturday 2011-04-02 11:44 +1100, Dean Jackson wrote:
> 
> On 01/04/2011, at 12:08 PM, L. David Baron wrote:
> 
> > The css3-animations spec should mention what happens when multiple
> > animations (i.e., multiple items in the 'animation-name' list) both
> > animate the same properties.
> > 
> > I presume that it should say that the last animation in the list
> > wins.
> 
> Yeah.

And, actually, in order to define that, it also needs to define when
an animation is animating a property.  I presume it is doing so when
the property is present in either of the neighboring keyframes for
the current time (where current time is defined on the 0%-100% axis,
not actual time, in order to account for the fun interaction of
animation-fill-mode and possibly-fractional animation-duration).
That allows two neighboring keyframes to have the same value but
still cause the animation to override the lower rules, but also
allows animations to override each other somewhat reasonably.

(Alternatively, I suppose one could check for whether the property
is specified in any keyframe -- though that's a bit more work.)

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Tuesday, 12 April 2011 04:09:40 GMT

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