Re: transitions vs. animations

On Apr 15, 2010, at 8:34 PM, Andrew Fedoniouk wrote:
> Please see my comments below:
> 
> From: Simon Fraser
> 
> Consider:
> 
> .foo {
>   animate-in: "bounce" top 1s once;
> }
> 
> .bar {
>   animate-in: "bounce" top 1s once;
> }
> 
> When the class changes from "foo" to "bar", does the animation of "top" run?
>  
> If you will remove .foo and apply .bar then you will have
> "style changed" condition and so new-animation-in is used -
> it will play bounce once.

But this isn't how CSS works (or certainly not how browsers implement style resolution). Once the cascading steps have been applied, information about where the style came from is lost. We just see that the old style has "animate-in: "bounce" top 1s once;" and the new style has the same rule. The browser will think there is no change, and not run the animation.

Simon

Received on Friday, 16 April 2010 04:32:54 UTC