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

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