summaryrefslogtreecommitdiff
path: root/source/bower_components/modernizr/feature-detects/css-lastchild.js
blob: 3e51516476c39517634553497bd895569b37735a (plain)
1
2
3
4
5
6
7
8
9
10
11
// last-child pseudo selector
// https://github.com/Modernizr/Modernizr/pull/304


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);

});