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.
 
 
 
 

45 lines
874 B

  1. import cssVars from "css-vars-ponyfill";
  2. cssVars({
  3. // Targets
  4. rootElement : document,
  5. shadowDOM : false,
  6. // Sources
  7. include : 'link[rel=stylesheet],style',
  8. exclude : '',
  9. // Define CSS Variables and use them in CSS.
  10. variables : {
  11. },
  12. // Options
  13. onlyLegacy : true,
  14. preserveStatic: true,
  15. preserveVars : false,
  16. silent : false,
  17. updateDOM : true,
  18. updateURLs : true,
  19. watch : false,
  20. // Callbacks
  21. onBeforeSend: function(xhr, elm, url) {
  22. // ...
  23. },
  24. onError: function(message, elm, xhr, url) {
  25. // ...
  26. },
  27. onWarning: function(message) {
  28. // ...
  29. },
  30. onSuccess: function(cssText, elm, url) {
  31. // ...
  32. },
  33. onComplete: function(cssText, styleElms, cssVariables, benchmark) {
  34. // ...
  35. },
  36. onFinally: function(hasChanged, hasNativeSupport, benchmark) {
  37. // ...
  38. }
  39. });