Skip to content

Instantly share code, notes, and snippets.

@danbeam
Created April 12, 2011 02:30
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 danbeam/914808 to your computer and use it in GitHub Desktop.
Save danbeam/914808 to your computer and use it in GitHub Desktop.
Feature detecting styles on Mozilla's homepage
// 1) Go to - http://www.mozilla.com/en-US/firefox/fx/ in FF3-4, Chrome
// 2) Run this:
(function () {
var p = document.getElementsByTagName('p')[3];
p.style.boxShadow = '5px 5px red';
p.style.MozBoxShadow = '5px 5px yellow';
p.style.WebkitBoxShadow = '-5px -5px blue';
var c = p.cloneNode(true);
console.log('Original', 'box-shadow', p.style.boxShadow, '-webkit-box-shadow', p.style.WebkitBoxShadow, '-moz-box-shadow', p.style.MozBoxShadow);
console.log('Cloned', 'box-shadow', c.style.boxShadow, '-webkit-box-shadow', c.style.WebkitBoxShadow, '-moz-box-shadow', c.style.MozBoxShadow);
}());
// 3) Look at the console, :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment