Sin descripción

style-inject.es-1f59c1d0.js 720B

123456789101112131415161718192021222324252627282930
  1. function styleInject(css, ref) {
  2. if ( ref === void 0 ) ref = {};
  3. var insertAt = ref.insertAt;
  4. if (!css || typeof document === 'undefined') { return; }
  5. var head = document.head || document.getElementsByTagName('head')[0];
  6. var style = document.createElement('style');
  7. style.type = 'text/css';
  8. if (insertAt === 'top') {
  9. if (head.firstChild) {
  10. head.insertBefore(style, head.firstChild);
  11. } else {
  12. head.appendChild(style);
  13. }
  14. } else {
  15. head.appendChild(style);
  16. }
  17. if (style.styleSheet) {
  18. style.styleSheet.cssText = css;
  19. } else {
  20. style.appendChild(document.createTextNode(css));
  21. }
  22. }
  23. export { styleInject as s };
  24. //# sourceMappingURL=style-inject.es-1f59c1d0.js.map