W3C home > Mailing lists > Public > www-style@w3.org > June 2014

Re: [css-animations] Animations that start and end in the past

From: Sylvain Galineau <galineau@adobe.com>
Date: Tue, 3 Jun 2014 16:24:54 +0000
To: Brian Birtles <bbirtles@mozilla.com>
CC: "<www-style@w3.org>" <www-style@w3.org>
Message-ID: <5D0CB233-63B4-41B3-B2D4-AC4E36E76A09@adobe.com>

On Jun 2, 2014, at 7:54 PM, Brian Birtles <bbirtles@mozilla.com> wrote:

> 
> Sorry for the delay in following this up.
> 
> I think this comes down to whether setting a negative delay is equivalent to:
> 
> a) Starting the timeline at a point after the animation has finished, or
> b) Seeking to a point after the animation has finished.
> 
> For (a) you wouldn't expect events, for (b) you probably would.
> 
> I'm ok with either. However, if the negative delay meant you started half-way through the animation, I think (a) would suggest you only fire an end event in that case. Yet I thought we agreed they should be symmetrical?

No, if you run the animation at any point on the timeline before its duration ends you should see a start event. Properties of the latter should let you figure out where you started from.

> 
> Again, I'm ok with (a) but is it odd that:
> 
>  animation: anim 3s -3s forwards;
> 
> Dispatches start and end and fills but:
> 
>  animation: anim 3s -3.0001s forwards;
> 
> Dispatches nothing and fills?

I don't really see a way around this. And again, the answer should be based on what authors use these events for. If the main use-case is to synchronize another operation/effect/animation with the start of the animation, I believe firing a start event at any point below a -3s delay seems confusing when no start event fires during a positive delay phase. I'm mostly inclined to make things symmetrical here i.e. start does not fire before the animation's execution phase; it doesn't fire beyond it either. It can only fire during the part of the timeline covered by the animation's duration.

This being said, we are talking here about edge cases and I could live with events firing in this case though I'd feel a lot better if there was some use-case or we could at least show authors need not worry about it. The scenario I'm far more interested in is the case where an animation is applied in the paused state. If this results in a start event then I think some authors are going to have a bad time and I know of some compat risk in existing apps. 

> 
> Maybe it's ok?
> 
> Best regards,
> 
> Brian
> 
Received on Tuesday, 3 June 2014 16:25:37 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:22 UTC