Skip to content

Instantly share code, notes, and snippets.

@ryanseddon
Created May 20, 2011 05:44
Show Gist options
  • Save ryanseddon/982417 to your computer and use it in GitHub Desktop.
Save ryanseddon/982417 to your computer and use it in GitHub Desktop.
Get computed styles
testStyle = function( prop, value ) {
return injectElementWithStyles('#modernizr { '+prop+': '+value+' }',function(elem){
return (window.getComputedStyle ?
getComputedStyle(elem, null) :
elem.currentStyle)[prop] == value;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment