W3C home > Mailing lists > Public > www-style@w3.org > April 2010

Re: Are CSS animations a done deal?

From: Lars Gunther <gunther@keryx.se>
Date: Tue, 06 Apr 2010 20:58:27 +0200
Message-ID: <4BBB8453.9040908@keryx.se>
To: www-style list <www-style@w3.org>
2010-04-05 18:07, Anne van Kesteren skrev:
> It also re-invents CSS syntax elsewhere for no good reason. It actually
> has a higher barrier to entry for designers, who would need to learn
> ECMAScript.

I think not. They would only learn how to put key-value pairs in JSON, a 
/very/ small subset of ECMAScript, very similar to CSS.

The point being is that it is now an object that can be applied to any 

And we do not need to differentiate between on-entry and on-exit. We 
have those already:

- focus/blur
- mouseover/mouseout (mouseenter/mouseleave would be a better fit, but 
there is no universal support yet, though)
- mousedown/mouseup
- load/unload

> It also fails to separate logic and style, by putting all
> kinds of stylistic information in the scripting layer. E.g. colors, etc.

If scripts start with a JSON-definition section or if those are kept in 
a separate file, there is still separation of concerns and logic.

I think that it is telling that in the long threads about CSS animation 
syntax nobody is addressing probable real world use cases:

- S5 presentations, where slides and bullet points animate.
- Prezi-style animated presentations.
- Image slideshows.
- Advertising (yes, that is where well see much of this being put to use!)
- Notifications information sent from the server (EventSource and XHR)
- HTML5 details (yes, designers are going to want to control the effect)
- Various forms of menus.

And of course:
- Switching between pages on a site. Why not animate the whole page?

While I am at it, I was asked about when animation carry information and 
is not purely decorative.

First of all, who could imagine Bespin when Canvas was first thought up? 
Yet, here we are with endless discussions about how to make canvas 

I think it is quite easy to imagine information coming in and out of 
view, using animations. The user pushes a button or moves the pointer 
and large parts of the information on the screen has changed. If that 
occurs using CSS-animations only, how would non-sighted users know?

We have seen examples of a Star Wars walker, done using CSS-animations. 
The technique is powerful. Is it that hard to imagine someone using it 
to convey information?

Yes, it brakes the model of what one is supposed to do using CSS, but it 
will happen. Why not prepare for it?

Or should that preparation just be to add a few sentences like this to 
the spec:

"Animations is a technique intended for presentational purposes only. 
Under no circumstances should authors attempt to use it to convey any 
information. And all ninjas be damned if they try!"

Lars Gunther
Received on Tuesday, 6 April 2010 18:58:58 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:44 UTC