diff options
Diffstat (limited to 'source/bower_components/modernizr/feature-detects/css-backgroundposition-xy.js')
-rw-r--r-- | source/bower_components/modernizr/feature-detects/css-backgroundposition-xy.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/bower_components/modernizr/feature-detects/css-backgroundposition-xy.js b/source/bower_components/modernizr/feature-detects/css-backgroundposition-xy.js new file mode 100644 index 0000000..d52d600 --- /dev/null +++ b/source/bower_components/modernizr/feature-detects/css-backgroundposition-xy.js @@ -0,0 +1,15 @@ +/* + Allan Lei https://github.com/allanlei + + Check adapted from https://github.com/brandonaaron/jquery-cssHooks/blob/master/bgpos.js + + Test: http://jsfiddle.net/allanlei/R8AYS/ +*/ +Modernizr.addTest('bgpositionxy', function() { + return Modernizr.testStyles('#modernizr {background-position: 3px 5px;}', function(elem) { + var cssStyleDeclaration = window.getComputedStyle ? getComputedStyle(elem, null) : elem.currentStyle; + var xSupport = (cssStyleDeclaration.backgroundPositionX == '3px') || (cssStyleDeclaration['background-position-x'] == '3px'); + var ySupport = (cssStyleDeclaration.backgroundPositionY == '5px') || (cssStyleDeclaration['background-position-y'] == '5px'); + return xSupport && ySupport; + }); +});
\ No newline at end of file |