Re: [css-animations] animation-iteration-count: infinite and animation-duration: 0s

On Sep 3, 2014, at 7:27 PM, Brian Birtles <bbirtles@mozilla.com> wrote:

> Hi,
> 
> While we're tying up loose ends in CSS animations, what is the behavior of the following?
> 
>  animation-duration: 0s;
>  animation-iteration-count: infinite;
>  animation-fill-mode: both;
> 
> The problem arises because when we come to calculate the active duration of the animation we get:
> 
>  active duration = 0 * infinity = indeterminate form
> 
> In Web Animations we came across this situation and considered some possibilities:
> 
>  a) let active duration = 0 -> final key frame value is shown, start/end events are dispatched
> 
>  b) let active duration = infinity -> initial key frame value is shown, start event only is dispatched
> 
>  c) it's invalid -> nothing is shown, no events are dispatched
> 
> Currently, the spec says (a)[1] but when we discussed this recently we decided (b) is probably preferable.[2]
> 
> We liked (c) too but it complicated the model and the API since it involves more checks for this particular edge case.
> 
> What do you think?

(a) seems hard to explain, imo.
(b) sounds reasonable, though I assume the initial keyframe is only visible because the iteration count is infinite?
(c) Yeah, no sure why this needs to be invalid.

> 
> Best regards,
> 
> Brian
> 
> 
> [1] http://dev.w3.org/fxtf/web-animations/#calculating-the-active-duration, based on http://lists.w3.org/Archives/Public/public-fx/2013OctDec/0199.html
> [2] http://lists.w3.org/Archives/Public/public-fx/2013OctDec/0199.html
> 

Received on Thursday, 4 September 2014 19:36:53 UTC