The website of Ura Design
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
694 B

7 years ago
// developer.mozilla.org/en/CSS/background-repeat
// test page: jsbin.com/uzesun/
// http://jsfiddle.net/ryanseddon/yMLTQ/6/
(function(){
function getBgRepeatValue(elem){
return (window.getComputedStyle ?
getComputedStyle(elem, null).getPropertyValue('background') :
elem.currentStyle['background']);
}
Modernizr.testStyles(' #modernizr { background-repeat: round; } ', function(elem, rule){
Modernizr.addTest('bgrepeatround', getBgRepeatValue(elem) == 'round');
});
Modernizr.testStyles(' #modernizr { background-repeat: space; } ', function(elem, rule){
Modernizr.addTest('bgrepeatspace', getBgRepeatValue(elem) == 'space');
});
})();