W3C home > Mailing lists > Public > www-style@w3.org > May 2016

[css-animations] Keyframes appearing more than once in animation-name

From: Simon Fraser <smfr@me.com>
Date: Wed, 04 May 2016 12:11:36 -0700
Message-id: <F8ABE0C2-CB8F-465C-AFAF-6B399F393FB4@me.com>
To: www-style list <www-style@w3.org>
A bug was filed on WebKit showing incorrect behavior in an animation test case[1] which repeats the same keyframes in comma-separated animation-name, like:

  animation-name: a, b, a, b;
  animation-duration: 1s, 1s, 1s, 1s;
  animation-delay: 0s, 2s, 4s, 6s;
  animation-fill-mode: forwards, forwards, forwards, forwards;

@keyframes a {...}
@keyframes b {...}

I don't think the spec[2] has enough information to describe whether this should work in the static case, and what happens in the face of a change in the value.

In the example above, it's clear what the author wants, and it works in Chrome and FF. However, what happens when the value of animation-name changes? For example, if it changed to "a, a, b, b" in the example above, which animations would keep running?

Simon

[1] https://codepen.io/anon/pen/vGQXLr <https://codepen.io/anon/pen/vGQXLr>
[2] https://drafts.csswg.org/css-animations-1/#animation-name
Received on Wednesday, 4 May 2016 19:12:10 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:59 UTC