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

Re: transitions vs. animations

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 8 Apr 2010 15:31:19 -0700
Message-ID: <m2idd0fbad1004081531nf50652f9r1578d863893dccc6@mail.gmail.com>
To: Brad Kemper <brad.kemper@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 Thu, Apr 8, 2010 at 3:13 PM, Brad Kemper <brad.kemper@gmail.com> wrote:
> How am I changing how CSS syntax works?

You are saying that the following:

@keyframe {
  from { left: 0; }
  to { left: 20px; }
}

...doesn't mean "animate the 'left' property, from a value of 0 to
20px", but rather means "animate the left property, from its starting
value to its ending value + 20px".

At least, that's what it means when you use this keyframe in a
transition.  If you use it in an animation, it means what I said at
first.

This notion of implicitly combining two CSS values together is
completely novel and unprecedented.  *Nothing* in CSS works like this
in any fashion.

I brought up some questions about how this would work with other value
types; for %s, you came up with a new way to combine them
(multiplication, rather than addition), and it's not clear that there
is any coherent way to combine many values, such as colors or
keywords.

In addition, this actually *prevents* us from easily fulfilling the
use-case I mentioned, where I *do* in fact want to override the
transition entirely.

Finally, I don't think this even properly solves the problem you want
to solve.  Given an arbitrary start and end value for 'left', how do
you refer to 80% of the distance between start and end?  If I want to
do the "fling and bounce" animation I mentioned, how do I use this to
say "go from start to end over half the time, then bounce back 10% and
land on the final value over the second half"?


> Your "animation shorthand value
> inside a transition property value as a function argument" is much more
> different than my "shorthand inside a shorthand, with values similar to
> 'animation' values, but with differences".

I wasn't talking about the values of the "transition" property.  I was
talking about your proposal to interpret values inside @keyframes in a
completely novel way when used within a keyframe-animation.

~TJ
Received on Thursday, 8 April 2010 22:32:06 GMT

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