Skip to content

Instantly share code, notes, and snippets.

@yefremov
Created February 18, 2017 18:01
Show Gist options
  • Save yefremov/ec040994f7ce44423fedc44844dc945a to your computer and use it in GitHub Desktop.
Save yefremov/ec040994f7ce44423fedc44844dc945a to your computer and use it in GitHub Desktop.
Cross-browser method to get all CSS properties after all active sheets were applied and calculated
var getStyles = window.getComputedStyle
? function (node) { return window.getComputedStyle(node, null) };
: function (node) { return node.currentStyle };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment