Skip to content

Instantly share code, notes, and snippets.

@tmslnz
Created February 25, 2017 15:02
Show Gist options
  • Save tmslnz/38190134b5ff5066e0bfc8b8f09789ee to your computer and use it in GitHub Desktop.
Save tmslnz/38190134b5ff5066e0bfc8b8f09789ee to your computer and use it in GitHub Desktop.
Get list of transform props
function getTransforms (el) {
var values = [];
var re = /\w+\(.+?\)/gi;
var match = [];
while ((match = re.exec(el.style.transform)) !== null) {
values.push(match[0]);
}
return values;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment