Are CSS animations a done deal?

Hi

The recent discussion about CSS transitions and animations made me 
wonder if it has been finally decided that CSS animations will become a 
W3C recommendation?

I am a big fan of declarative animation and would not like for this to 
disappear into thin air.

But:

Does animation really belong in CSS? Can someone point me to the 
discussion where this was discussed and perhaps even decided?

----------------

P.S

Why am I suspicious?

1. There are many things that could trigger an animation, as opposed to 
a transition. Not only clicks, focus and hover, but also submits, 
gestures, various load states, changes to the DOM, etc. For this reason 
JavaScript authors will write wrapper functions and through these 
wrapper functions animations will be triggered for a majority of all use 
cases.

2. Manipulation of style and the DOM is done through scripting today. If 
animation is done imperatively it's through the DOM, if done 
declaratively it should be the same.

This aligns with how we have been teaching standards for a while now:

- HTML for basic structure and content.
- CSS for design and layout.
- The DOM for behaviour.

For reasons like these I think it would be more reasonable to declare 
the animation using JSON notation and have a dedicated DOM function to 
do the animation.

Today this can of course be done by adding or removing classes, however, 
but I think my idea is conceptually more clean.

document.getElementById("foo").addEventListener('click', loadAnimation, 
false);

function loadAnimation() {
     this.animate({
         "animation-name": "foobar",
         "animation-duration": "8s",
         "animation-iteration-count": "infinite"
     });
)

foobar = {
     // Keyframe rules
}





-- 
Lars Gunther
http://keryx.se/
http://twitter.com/itpastorn/
http://itpastorn.blogspot.com/

Received on Sunday, 28 March 2010 15:33:25 UTC