CSS animation-iteration-count spec says single value but is implemented taking multiple values

RESOLVED INVALID

Status

()

RESOLVED INVALID
2 years ago
2 years ago

People

(Reporter: sheppy, Unassigned)

Tracking

({dev-doc-complete})

51 Branch
dev-doc-complete
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
According to my reading of the CSS specification, the animation-iteration-count property [1] accepts a single animation iteration count value as its input [2].

<single-animation-iteration-count> is defined in the spec as "infinite | <number>". There's nothing there about allowing a comma-delineated list of iteration counts.

The documentation on MDN [3] currently defines the formal syntax per the spec, but includes an example syntax that includes commas.

Is the spec in need of updating or are we supporting a non-standard behavior?

This should be investigated and appropriate measures taken. Either the spec needs to be revised, the implementation needs to be revised, or the documentation needs to note the non-standard status of this syntax form.

[1] https://drafts.csswg.org/css-animations/#animation-iteration-count
[2] https://drafts.csswg.org/css-animations/#typedef-single-animation-iteration-count
[3] https://developer.mozilla.org/en-US/docs/Web/CSS/animation-iteration-count
Flags: needinfo?(dbaron)
> <single-animation-iteration-count> is defined in the spec as "infinite | <number>".

Yes, but the value of the property is defined like so:

  Value: <single-animation-iteration-count>#

That line noise at the end is defined at https://drafts.csswg.org/css-values-4/#mult-comma so as far as I can tell our implementation and the MDN docs match the spec.
Flags: needinfo?(dbaron)
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → INVALID
This particular detail is a bit confusing, so I've written a section to explain it:

https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Animations/Using_CSS_animations#Setting_multiple_animation_property_values

I've then referenced that from the animation-* property pages, for example:
https://developer.mozilla.org/en-US/docs/Web/CSS/animation-iteration-count#Values

Let me know if this makes sense.
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.