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

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

From: Sylvain Galineau <galineau@adobe.com>
Date: Thu, 4 Sep 2014 19:36:23 +0000
To: Brian Birtles <bbirtles@mozilla.com>
CC: "<www-style@w3.org>" <www-style@w3.org>
Message-ID: <4CFCA008-81AD-44CF-B014-7D548EF89F50@adobe.com>

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:41 UTC