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

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

From: Brian Birtles <bbirtles@mozilla.com>
Date: Thu, 04 Sep 2014 11:27:57 +0900
Message-ID: <5407CE2D.5070205@mozilla.com>
To: "www-style@w3.org" <www-style@w3.org>

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 

   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?

Best regards,


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 02:28:17 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:43 UTC