W3C home > Mailing lists > Public > www-style@w3.org > August 2014

Re: [css-animations] When/how are keyframe values computed?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 11 Aug 2014 09:36:45 -0700
Message-ID: <CAAWBYDC7dEht2a4JM-ingnXkb5d5V4ueWQsA=5uZ0Vt_rjmm+A@mail.gmail.com>
To: Sylvain Galineau <galineau@adobe.com>
Cc: Lea Verou <lea@verou.me>, "L. David Baron" <dbaron@dbaron.org>, "<www-style@w3.org>" <www-style@w3.org>
On Mon, Aug 11, 2014 at 9:12 AM, Sylvain Galineau <galineau@adobe.com> wrote:
> On Aug 10, 2014, at 9:55 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>> I don't know what you mean by this.  The "50%" is 50% progress through
>> the timing function.  You can tweak that to your heart's content, and
>> make the switch happen anywhere from the beginning to the end.
>
> Well, I don't know what you mean by this :) If the switch for non-animatable properties always occurs 50% through the timing function, how do I tweak it to happen anywhere? Negative animation-delay certainly let you drag it further to the beginning. But how do you push it to the end of the duration? Or do you mean something else?

Okay, something's going terribly wrong in one of our mental models, or
one of our wording choices, if we can't understand each other here.

To adjust where the 50% point is, you just... change the timing
function.  You can get the 50% point literally anywhere from start to
finish by providing the appropriate cubic-bezier() function.  (Of
course, using steps() is easier for actual start/end, but still.)

Maybe you're misunderstanding that by "make the switch happen
anywhere", I mean "make the switch happen anywhere in the duration of
the animation"?  It always occurs at 50% *progress*, but that can
occur at any *time*, depending on your timing function.

~TJ
Received on Monday, 11 August 2014 16:37:33 UTC

This archive was generated by hypermail 2.3.1 : Monday, 11 August 2014 16:37:33 UTC