Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixup lastchild syntax. fixes #631

  • Loading branch information...
commit 45bdc31c93781e39bf214cd4dde48abad8cf309f 1 parent 819cd5a
Paul Irish paulirish authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 feature-detects/css-lastchild.js
9 feature-detects/css-lastchild.js
View
@@ -2,7 +2,10 @@
// https://github.com/Modernizr/Modernizr/pull/304
-Modernizr.testStyles("#modernizr div {width:100px} #modernizr :last-child{width:200px;display:block}", function (elem) {
- var lastchild = Modernizr.addTest('lastchild', elem.lastChild.offsetWidth > elem.firstChild.offsetWidth);
-}, 2);
+Modernizr.addTest('lastchild', function(){
+ return Modernizr.testStyles("#modernizr div {width:100px} #modernizr :last-child{width:200px;display:block}", function (elem) {
+ return elem.lastChild.offsetWidth > elem.firstChild.offsetWidth;
+ }, 2);
+
+});
Please sign in to comment.
Something went wrong with that request. Please try again.