W3C home > Mailing lists > Public > www-style@w3.org > October 2011

[css3-animations] Pausing animations that are not yet running

From: Øyvind Stenhaug <oyvinds@opera.com>
Date: Thu, 06 Oct 2011 17:18:38 +0200
To: "www-style@w3.org" <www-style@w3.org>
Message-ID: <op.v2xrhcesbunlto@oyvinds-desktop>
http://dev.w3.org/csswg/css3-animations/#the-animation-play-state-property-

"A running animation can be paused by setting this property to ‘paused’."

This doesn't really explain what happens to a given animation if it's not  
yet running when animation-play-state is set to 'paused'. E.g. when going  
 from "animation: paused none" to "animation: paused my-animation", or if  
the animation has been applied but hasn't reached 0% yet due to  
animation-delay. (It's not very clear if a delaying animation counts as  
"running", though the elapsedTime text seems to imply that it doesn't.)

Setting animation-name after or at the same time as  
animation-play-state:paused, the behaviors of WebKit and Gecko seem  
somewhat unexpected. They don't dispatch animationstart, but they apply  
the 0% keyframe if animation-delay is 0s, even when animation-fill-mode is  
'none'. With positive delay they use the 0% keyframe only for 'both' and  
'backwards'. WebKit treats negative delays the same as 0s, whereas Gecko  
applies the same values it would use if animation-play-state were  
'running'.

-- 
Øyvind Stenhaug
Core Norway, Opera Software ASA
Received on Thursday, 6 October 2011 15:19:07 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:45 GMT