Re: transitions vs. animations

On Apr 4, 2010, at 4:37 PM, Perry Smith <pedzsan@gmail.com> wrote:

> Lars appears to have the opinion that the desire of some is to have  
> these animations ONLY be when classes are changed.  That really  
> doesn't make any sense to me.

No one has suggested that using JavaScript should be the only way to  
trigger an animated transition, so if Lars thinks that, then he  
misunderstood. Håkon was looking for a way to get keyframe animations  
(which animate properties that might not otherwise be changing anyway)  
to occur at the same as transitions (which animate based on the fact  
that a property is already changing values, due to state change rules,  
class changes, or whatever), and hoping to unify the 'animation'  
property (and associated component properties of that shorthand) with  
the 'transition' property (and associated component properties of that  
shorthand). But Håkon's proposal included componants that seem to  
complicate the way transitions work, and that is where the  
disagreement occurs.

> If anyone cares to clarify their objective(s) as far as where does  
> CSS end and where does JS begin, it would help me a great deal.  I  
> really would like to understand.  I'm sure I am unimaginative when  
> it comes to animations because the current technology (using  
> Javascript) does everything I want.

This is the CSS working group, so we are talking about animations/ 
transitions that occur due to style rules, pseudo-classes, etc., and  
also (somewhat) about how these can be accessed through the DOM (or  
CSSOM). This does not rule out using a JavaScript library or some new  
JavaScript animation features. But it is likely that if you use  
JavaScript for animation that you will be manipulating styles and/or  
classes to do so, because we are making it simple to do that. If there  
are other means that don't  involve CSS or style attributes, then that  
is beyond the scope of this conversation. This is mostly about using  
plain old CSS rules, and sometimes a little JS if that's what floats  
you boat. Using JS to change classes is a powerful way to trigger an  
animated transition or keyframe animation, but JS-less pseudo-classes  
(representing state changes like hover, for instance) are absolutely  
an important part of the this.

If I've misrepresented the discussion, I'm sure someone will point it  
out.

Received on Monday, 5 April 2010 01:01:55 UTC