Created
April 24, 2011 00:51
-
-
Save ryanseddon/939186 to your computer and use it in GitHub Desktop.
Modernizr CSS3 Generated Content test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Using the new exposed styleElem method we can hook into the internal DOM injection code that modernizr uses. | |
// This make doings tests like this easy! | |
// Opera is currently the only browser to support CSS3 generated content, which will replace all the elements content | |
// with the content properties value. | |
Modernizr.addTest('css3generatedcontent', function () { | |
var bool; | |
Modernizr.testStyles("#modernizr { content:':)' }",function(node){ | |
bool = node.offsetHeight >=1; | |
}); | |
return bool; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment