SVG element scale animation via CSS doesn't fire
Categories
(Core :: SVG, defect)
Tracking
()
People
(Reporter: chriskirknielsen, Assigned: longsonr)
References
(Regression)
Details
(Keywords: nightly-community, regression)
Attachments
(3 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:123.0) Gecko/20100101 Firefox/123.0
Steps to reproduce:
- Create an SVG element with a <rect> element.
- Set a starting scale for the element of
0with CSS, e.g.:rect { transform: scale(0); }. - Assign an animation on the element to reset its transform:
rect { animation: reset 1s ease-in-out 1 both; }and@keyframes reset { to { transform: none; }}.
DEMO: https://codepen.io/chriskirknielsen/pen/LYvEqXZ
See the demo, in the left column, nothing animated in. My fix is to use a near-zero scale (this triggers another known bug when using non-scaling-stroke).
Other info:
❌ Tested on Firefox 123.0 and Firefox Nightly 125.0a1 (2024-03-03), both fail.
✅ Tested on Chrome 122.0.6261.94, works as expected
✅ Tested on Safari 16.5.2, works as expected
💻 macOS Ventura 13.4.1 on a 16" MacBookPro (2019)
Actual results:
The animation never fires. The element can "snap" into its final state if you resize the window enough so the SVG element changes size (nothing happens if the SVG stays the same size).
Expected results:
The animation should fire automatically like any other animation.
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::SVG' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•2 years ago
|
||
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=0905d8963ffab547436a67d3e7d5597fb1fd4846&tochange=6e082b6757630d3c57382feb106a674056881f86
Comment 3•2 years ago
|
||
Set release status flags based on info from the regressing bug 1247218
Updated•2 years ago
|
Updated•2 years ago
|
Comment 4•2 years ago
|
||
The severity field is not set for this bug.
:tlouw, could you have a look please?
For more information, please visit BugBot documentation.
Comment 5•2 years ago
|
||
When you start the browser and the page loads the first time, the animation fires correctly, but when you click the replay button, even refresh the page or even open it in another tab, the animation doesn't play.
Removing the vector-effect: non-scaling-stroke; value does "fix" the problem as mentioned.
| Assignee | ||
Comment 6•1 year ago
|
||
Updated•1 year ago
|
| Assignee | ||
Comment 7•1 year ago
|
||
Comment 10•1 year ago
|
||
| bugherder | ||
Updated•1 year ago
|
Description
•