Last active
April 10, 2020 07:58
-
-
Save u3u/2678713c46cb79ac9c2db9f040d2d45e to your computer and use it in GitHub Desktop.
Fix safari 13.1 getComputedStyle `cssText` missing `transform-origin`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function cssText(el) { | |
const style = window.getComputedStyle(el); | |
const transformOrigin = ` transform-origin: ${style.transformOrigin};`; | |
return style.cssText + transformOrigin; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment