Skip to content

Commit

Permalink
background-size: cover; test added.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Aug 15, 2011
1 parent 7554e07 commit 26cbd5d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions feature-detects/css-backgroundsizecover.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

// developer.mozilla.org/en/CSS/background-size

Modernizr.testStyles(' #modernizr { background-size: cover; } ', function(elem, rule){

var bool = (window.getComputedStyle ?
getComputedStyle(elem, null) :
elem.currentStyle)['background-size'] == 'cover';

Modernizr.addTest('bgsizecover', bool);
});

0 comments on commit 26cbd5d

Please sign in to comment.