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

On Feb 27, 2015, at 11:49 AM, Estelle Weyl <estelle@weyl.org> wrote:

> 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?)

The issue here is that the initial value for “transition-property” is “all”, and the initial value for “transition-duration” is “0s", so if we do what you suggest, then user agents would have to fire transitionEnd events for every single style change.

Simon

Received on Sunday, 1 March 2015 05:22:18 UTC