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

Re: transitions vs. animations

From: Brad Kemper <brad.kemper@gmail.com>
Date: Thu, 8 Apr 2010 15:03:49 -0700
Message-Id: <6D38EE2C-8924-4803-A7C3-3671199E43C2@gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: HÃ¥kon Wium Lie <howcome@opera.com>, Perry Smith <pedzsan@gmail.com>, "www-style@w3.org list" <www-style@w3.org>
On Apr 8, 2010, at 12:38 PM, "Tab Atkins Jr." <jackalmage@gmail.com>  
wrote:

> On Thu, Apr 8, 2010 at 12:24 PM, Brad Kemper <brad.kemper@gmail.com>  
> wrote:
>> This also
>> allows the use of individual transition-animation-* properties  
>> after the
>> slash, instead of always using the shorthand. I think that's a  
>> pretty big
>> deal, and a motivation for doing it this way.
>
> I don't understand what you mean by this.  Could you expand on this?

Sure. In most of our conversations we've been using shorthand. So  
consider this:

transition: position 1s / bounce 1s alternate;

That is actually shorthand for the following:

transition-property: position;
transition-duration: 1s;
transition-animation: bounce 1s alternate;

Thus, in a second rule, I was able to write this, instead of rewriting  
out all the other transition values:

transition-animation: bounce 1s;

The 'transition-animation' is then a shorthand which is very similar  
to the animation shorthand, with these component values in the first  
'transition-animation' rule above:

transition-animation-name: bounce;
transition-animation-duration: 1s;
transition-animation-direction: alternate;

Thus, for that second rule, I could have just written this:

transition-animation-direction: normal;

...instead of writing out the 'transition-animation' shorthand with  
that as an initial value.
Received on Thursday, 8 April 2010 22:04:38 GMT

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