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)

58 Branch
x86_64
Windows 7
defect

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
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
Component: Untriaged → Layout
Product: Firefox → Core
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)
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)
Depends on: 878346
Status: UNCONFIRMED → NEW
Ever confirmed: true
[ Triage 2017/02/20: P3 ]
Priority: -- → P3
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.
Status: NEW → RESOLVED
Closed: 6 years ago
No longer depends on: 878346
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.