Closed
Bug 1435443
Opened 7 years ago
Closed 6 years ago
css transition does not work on svg transform attribute
Categories
(Core :: SVG, defect, P3)
Tracking
()
RESOLVED
DUPLICATE
of bug 878346
People
(Reporter: artin.phares, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
Steps to reproduce:
- create SVG element
- add CSS transition for target element: 'transition: transform 2s'
- change 'transform' attribute of target element from javascript
Actual results:
CSS transition ignored. Transformation is applied, but not animated.
Expected results:
Changes of transformation should be animated.
But, if transform is defined in CSS instead of attribute (both transformation and transition are in CSS) then it works.
Cannot use this workaround, because CSS transform on SVG elements is not supported in Edge.
Playground:
http://jsbin.com/sekasid/edit?html,output
Reporter | ||
Updated•7 years ago
|
OS: Unspecified → Windows 7
Hardware: Unspecified → x86_64
Summary: css transition does not work on svg transform → css transition does not work on svg transform attribute
Comment 1•7 years ago
|
||
Without knowing much about SVG I suspect this is working as intended, the transform attribute doesn't map to the CSS property, so getComputedStyle(rect).transform in your example is always 'none'.
Maybe Jonathan can take a look and confirm that?
Component: Layout → SVG
Flags: needinfo?(jwatt)
Comment 2•7 years ago
|
||
The transform attribute didn't mapt to the CSS property in SVG 1.1, it should in SVG 2. We just haven't implemented that yet (bug 878346)
Flags: needinfo?(jwatt)
Updated•7 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 4•6 years ago
|
||
I think this is effectively a duplicate of bug 878346, then. Once the transform attribute causes the "transform" property value to be set, then transitions should Just Work.
You need to log in
before you can comment on or make changes to this bug.
Description
•