customproperties.js 619 B

1234567891011121314151617181920
  1. /*!
  2. {
  3. "name": "CSS Custom Properties",
  4. "property": "customproperties",
  5. "caniuse": "css-variables",
  6. "tags": ["css"],
  7. "builderAliases": ["css_customproperties"],
  8. "notes": [{
  9. "name": "MDN Docs",
  10. "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/--*"
  11. },{
  12. "name": "W3C Spec",
  13. "href": "https://drafts.csswg.org/css-variables/"
  14. }]
  15. }
  16. !*/
  17. define(['Modernizr'], function(Modernizr) {
  18. var supportsFn = (window.CSS && window.CSS.supports.bind(window.CSS)) || (window.supportsCSS);
  19. Modernizr.addTest('customproperties', !!supportsFn && (supportsFn('--f:0') || supportsFn('--f', 0)));
  20. });