W3C home > Mailing lists > Public > www-style@w3.org > November 2012

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

From: Rik Cabanier <cabanier@gmail.com>
Date: Thu, 15 Nov 2012 21:03:11 -0800
Message-ID: <CAGN7qDDEw=JtgN1Wq4ztSJKZj28t4Ry5fSfDMW-cMib9zoMDVA@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
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 GMT

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