w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.42k stars 650 forks source link

[CSSOM] Getting Transforms #380

Open hfhchan opened 8 years ago

hfhchan commented 8 years ago

Currently there is no easy way to get something like this:

[
  Scale{ [1.1] },
  Translate{ ["2px", "2px"] }
]

from an HTMLElement with an inherited transform.

Animation scripts have to write complicated code to reverse the matrix() given by window.computedStyle(), which is not always possible.

On the other hand, SVGElement.transform.baseVal returns separate transforms with matrices that are at least reversable.

dbaron commented 7 years ago

This might be a job for css-typed-om.