W3C home > Mailing lists > Public > www-style@w3.org > February 2015

[css3-transitions] transition-duration: 0 versus animation-duration: 0s;

From: Estelle Weyl <estelle@weyl.org>
Date: Fri, 27 Feb 2015 11:49:31 -0800
Message-Id: <312027B3-C49D-4E21-9A88-83A9518C55F1@weyl.org>
To: "L. David Baron" <dbaron@dbaron.org>, www-style list <www-style@w3.org>
When an animation last 0s, and therefore is not perceptible, it still occurs. Both an animationstart and animationend occur, though no animationiteration occurs, even if there are 100 iterations of 0 seconds each. Additionally, animation-fil-mode: forwards and both will both leave the element on the 100% keyframe.

This is not what happens with transitions.

>> By default the value is 0s, meaning that the transition is immediate (i.e. there will be no animation). 

there is still a transition, just no animation of that transition.
the animationend event does not occur currently in browsers. 
I am not sure if that sentence is clearly stating the animation is not occurring and therefore no transitionend event should occur. Whether or not that is what it is stating, I think the transitionend event should still occur. The property values are still transitioning. They’re just doing so over 0ms, just like with the animation of 0s. The default  for animation-duration is 0s, not ‘no animation’

I think consistency between CSS animation and CSS transitions is important. To me this feels inconsistent. Thoughts? (or has this been hashed out, and i missed the convo?)

Note that if there is a delay greater than 0ms on the transition, but a default duration of 0s, the transitionend does occur.


Estelle Weyl
Received on Saturday, 28 February 2015 16:35:53 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:52:01 UTC