PageRenderTime 17ms CodeModel.GetById 12ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/AppLanding/js/vendor/modernizr/feature-detects/css-backgroundposition-shorthand.js

https://gitlab.com/webocalypse/themes
JavaScript | 19 lines | 9 code | 4 blank | 6 comment | 0 complexity | 3bf4308b23f8ae0a52c2ac6c546c8f9c MD5 | raw file
 1/*
 2    https://developer.mozilla.org/en/CSS/background-position
 3    http://www.w3.org/TR/css3-background/#background-position
 4
 5    Example: http://jsfiddle.net/Blink/bBXvt/
 6*/
 7
 8(function() {
 9
10    var elem = document.createElement('a'),
11        eStyle = elem.style,
12        val = "right 10px bottom 10px";
13
14    Modernizr.addTest('bgpositionshorthand', function(){
15        eStyle.cssText = "background-position: " + val + ";";
16        return (eStyle.backgroundPosition === val);
17    });
18
19}());