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

Re: [css-animations] What happens if a @keyframes rule is added after the fact?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 2 Jul 2014 23:34:08 -0700
Message-ID: <CAAWBYDBkrER4aJiJemUOS6gdEspsgb0-Nh+vXLuwDxB-dEo=5w@mail.gmail.com>
To: Brian Birtles <bbirtles@mozilla.com>
Cc: "www-style@w3.org" <www-style@w3.org>
On Wed, Jul 2, 2014 at 7:14 PM, Brian Birtles <bbirtles@mozilla.com> wrote:
> Hi,
> If I set "animation: doesntYetExist 10s" and, within 10s, add "@keyframes
> doesntYetExist { ... }" by script, what happens?
> a) The animation doesn't start
> b) The animation starts from the beginning
> c) The animation picks up from part-way through
> From my testing, IE does (a) and Chrome does (b). Current nightlies of
> Firefox do (c).
> This question also relates to whether dynamic changes to keyframes are
> honoured. David pointed out several years ago that the spec says values are
> snapshotted but WebKit doesn't do this (and hence nor does Gecko) and that
> there may be good reasons for allowing dynamic changes to keyframes.[1]
> I think (a) is more in keeping with the current wording of the spec but if
> we allow dynamic changes to keyframes then either (b) or (c) would be
> possible.

I was going to say (a) was absolutely wrong, but your point about
snapshotting is valid and troublesome.  Hmm.  I'd like to be
consistent between "nothing, then something" and "something, then
something else" for @keyframes changes.

Received on Thursday, 3 July 2014 06:34:54 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:44 UTC