calc() is not supported in animation-iteration-count

NEW
Unassigned

Status

()

P3
normal
2 years ago
a year ago

People

(Reporter: nox, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
Safari and Chrome both allow that, I have no access to Edge.

The spec doesn't say anything about calc() expressions at the very least.

https://drafts.csswg.org/css-animations/#typedef-single-animation-iteration-count

```
<div style="animation-iteration-count: calc(2)"></div>
<pre>
<script>
    var div = document.getElementsByTagName("div")[0];
    document.writeln(div.style.animationIterationCount);
    document.writeln(getComputedStyle(div).animationIterationCount);
</script>
```
Does Servo support that? If so, we probably should track this as a behavior change, and need to decide at some point whether we need to fix Gecko before shipping Stylo.

IIRC, Gecko's calc() support to number types are quite poor. There are many places where calc is not implemented. But It doesn't seem to me they could lead to serious webcompat issue, so I guess to just ship the changes with Stylo...
(Reporter)

Comment 2

a year ago
(In reply to Xidorn Quan [:xidorn] UTC+10 from comment #1)
> Does Servo support that? If so, we probably should track this as a behavior
> change, and need to decide at some point whether we need to fix Gecko before
> shipping Stylo.
> 
> IIRC, Gecko's calc() support to number types are quite poor. There are many
> places where calc is not implemented. But It doesn't seem to me they could
> lead to serious webcompat issue, so I guess to just ship the changes with
> Stylo...

Yes Servo supports that, because it's easier to support it than not to.
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.