[CSS, idea] Animations *are* Transitions.

It appears that current CSS Animation proposal is about two problems:

1) Keyframes - the way of defining relatively complex ease (timing) 
functions.
2) Infinite execution of transitions.

So what about the following:

a) To add following attribute:
    transition-iterations: <number> | infinite;

b) To add, say, @-rule named 'profile'
     @profile "name" <percent1>/<value1> <percent2>/<value2> ... 
<percentN>/<valueN>;
    where the <value> is in this case some decimal (not exactly in the range 
0.0 ... 1.0)

Having the @profile in place we can declare that "wobble" thing as:

@profile "wobble"  0% 1.0,  40% 1.5, 60% 0.75, 100% 1.0;

and use it as:

div
{
    transition: left "wobble" 400ms infinite;
}

So the transition will be the sole entity that will define various 
animations.
(Actually I would just rename such unified 'transition' to 'animation' as it 
is more
opaque word for such group of effects).

And yet, the @profile can be used for defining gradients and so to simplify 
their syntax too.

-- 
Andrew Fedoniouk

http://terrainformatica.com







 

Received on Thursday, 8 April 2010 02:30:35 UTC