Added 'first-child' pseudo-selector test. #717

Closed
wants to merge 1 commit into
from
+7 −0
Split
@@ -0,0 +1,7 @@
+// 'first-child' pseudo-selector test.
+
+Modernizr.addTest('firstchild', function() {
+ return Modernizr.testStyles("#modernizr div {width:100px} #modernizr :first-child {width:200px;display:block}", function(elem) {
+ return elem.firstChild.offsetWidth > elem.lastChild.offsetWidth;
+ }, 2);
+});