-
Notifications
You must be signed in to change notification settings - Fork 756
Closed
Labels
Closed Rejected as Wontfix by CSSWG Resolutioncss-transforms-1Current WorkCurrent Workcssom-1Current WorkCurrent Work
Description
I would like to suggest having getComputedStyle(element).transform function returning the actual transform functions and serialized matrix instead serialized matrix only.
Or alternative having a new function returning the actual transform functions.
Example:
https://jsfiddle.net/gibbok/pruyh2ns/
<div id="target"></div>div {
transform: translate(0, 0) rotate(45deg);
width: 50px;
height:100px;
background-color:red;
}var elem1 = document.getElementById("target");
var style = window.getComputedStyle(elem1, null);
console.log(style.transform);
// now returns matrix(0.707107, 0.707107, -0.707107, 0.707107, 0, 0)
// would be interesting having also the actual transform functions returned as translate(0, 0) rotate(45deg)Related documentation:
https://drafts.csswg.org/css-transforms/#serialization-of-the-computed-value
Related:
https://bugs.chromium.org/p/chromium/issues/detail?id=680111
web-animations/web-animations-js#101
Metadata
Metadata
Assignees
Labels
Closed Rejected as Wontfix by CSSWG Resolutioncss-transforms-1Current WorkCurrent Workcssom-1Current WorkCurrent Work