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

Re: transitions vs. animations

From: Simon Fraser <smfr@me.com>
Date: Mon, 05 Apr 2010 07:57:42 -0700
Cc: Håkon Wium Lie <howcome@opera.com>, "www-style@w3.org" <www-style@w3.org>
Message-id: <0DC33169-A46E-4987-AF95-7358F061C0AA@me.com>
To: Alex Mogilevsky <alexmog@microsoft.com>
On Apr 4, 2010, at 6:05 pm, Alex Mogilevsky wrote:

> /* start with a known static state - animations assume these start values */
> .button {
> 	position:relative;
> 	color:blue;
> 	left:0;
> }
> 
> /* 1. transition */
> .button:hover {
> 	left: 10px;
> 	color:red;
> 	on-entry: transition(color, 1s), transition(left, 1s);
> 	on-exit: transition(color, 1s), transition(left, 1s);
> }
> 
> /* 2. custom animation */
> .button:hover {
> 	left: 10px;
> 	color:red;
> 	on-entry: animation(button_normal_to_hover); 	
> 	on-exit: animation(button_hover_to_normal);
> }	
> 
> /* 3. custom animation - no specified end state*/
> .button:hover {
> 	on-entry: animation(button_normal_to_hover); 	
> 	on-exit: animation(button_hover_to_normal);
> }	
> 

This seems to suffers from the same problem as Håkon's proposal, namely authors having to handle the combinatorial number of changes between states, and not just the states themselves, and the lack of a definition of what constitutes a "state" when multiple selectors apply.

Simon
Received on Monday, 5 April 2010 14:58:17 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:26 GMT