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

[css-animations] What happens if a @keyframes rule is added after the fact?

From: Brian Birtles <bbirtles@mozilla.com>
Date: Thu, 03 Jul 2014 11:14:49 +0900
Message-ID: <53B4BC99.8000308@mozilla.com>
To: "www-style@w3.org" <www-style@w3.org>

If I set "animation: doesntYetExist 10s" and, within 10s, add 
"@keyframes doesntYetExist { ... }" by script, what happens?

a) The animation doesn't start
b) The animation starts from the beginning
c) The animation picks up from part-way through

 From my testing, IE does (a) and Chrome does (b). Current nightlies of 
Firefox do (c).

This question also relates to whether dynamic changes to keyframes are 
honoured. David pointed out several years ago that the spec says values 
are snapshotted but WebKit doesn't do this (and hence nor does Gecko) 
and that there may be good reasons for allowing dynamic changes to 

I think (a) is more in keeping with the current wording of the spec but 
if we allow dynamic changes to keyframes then either (b) or (c) would be 

Best regards,


[1] http://lists.w3.org/Archives/Public/www-style/2011Apr/0079.html
Received on Thursday, 3 July 2014 02:15:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:44 UTC