Re: [css3-animations] Ability to have "adjacent" keyframes / "instantaneous" interpolations

On Thu, Nov 15, 2012 at 8:48 PM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Thu, Nov 15, 2012 at 8:03 PM, Rik Cabanier <cabanier@gmail.com> wrote:
> > Why not have the same logic as the canvas gradient stops?
> > quote:
> >
> > If multiple stops are added at the same offset on a gradient, they must
> be
> > placed in the order added, with the first one closest to the start of the
> > gradient, and each subsequent one infinitesimally further along towards
> the
> > end point (in effect causing all but the first and last stop added at
> each
> > point to be ignored).
> >
> >
> > So keyframes can then contain:
> >
> > from {...}
> >
> > 50% {...}
> > 50% {...}
> > to {...}
> >
> > and you'd animate from 0 to the first 50% and then from the second 50% to
> > the end
>
> That is a change from the current semantics, where individual
> keyframes with the same selector occur at the same time.
>

The spec says:

To determine the set of keyframes, all of the values in the selectors are
sorted in increasing order by time. If there are any duplicates, then the
last keyframe specified inside the @keyframes rule will be used to provide
the keyframe information for that time. [1]

So, the current stated behavior is to throw the first one away. I didn't
see that one earlier :-(

How about:

from {...}

50% {...}, {...}
to {...}


1: http://dev.w3.org/csswg/css3-animations/#keyframes

Received on Friday, 16 November 2012 05:03:38 UTC