Bug 232280
| Summary: | Missing 'from' selector on @keyframes works erratically | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | jzabinski |
| Component: | Animations | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | Normal | CC: | dino, graouts, graouts, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari Technology Preview | ||
| Hardware: | Mac (Intel) | ||
| OS: | macOS 11 | ||
jzabinski
When @keyframes rules are used to animate elements and the 'from' selector is missing, the animation behaves erratically.
See this example:
https://stackblitz.com/edit/web-platform-vmalvc?file=styles.css
styles.css contains this @keyframes rule:
@keyframes dash {
to {
stroke-dashoffset: 0;
}
}
Running the project in Safari Technology Preview, I find that the line is animated erratically: anywhere from 20-60% of the time. If I add the 'from' keyword:
@keyframes dash {
from {
stroke-dashoffset: 14.7;
}
to {
stroke-dashoffset: 0;
}
}
The animation seems to happen consistently.
W3C says that 'If a 0% or from keyframe is not specified, then the user agent constructs a 0% keyframe using the computed values of the properties being animated.' That computation does not seem to be happening consistently. (Other browsers like Chrome work fine.)
(Reference: https://www.w3.org/TR/css-animations-1/)
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/84903751>
Antoine Quint
Can you still reproduce the issue with Safari Technology Preview 139? I'm not able to reproduce it myself.
jzabinski
Verified: no longer reproduces.
Antoine Quint
Great! Thanks for checking.