Skip to content

Instantly share code, notes, and snippets.

@u3u
Last active April 10, 2020 07:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save u3u/2678713c46cb79ac9c2db9f040d2d45e to your computer and use it in GitHub Desktop.
Save u3u/2678713c46cb79ac9c2db9f040d2d45e to your computer and use it in GitHub Desktop.
Fix safari 13.1 getComputedStyle `cssText` missing `transform-origin`
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