Re: transitions vs. animations

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 UTC