/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. Example: http://jsfiddle.net/Blink/bBXvt/
  5. */
  6. (function() {
  7. var elem = document.createElement('a'),
  8. eStyle = elem.style,
  9. val = "right 10px bottom 10px";
  10. Modernizr.addTest('bgpositionshorthand', function(){
  11. eStyle.cssText = "background-position: " + val + ";";
  12. return (eStyle.backgroundPosition === val);
  13. });
  14. }());