UNPKG

kinetic-slider

Version:

A WebGL-powered kinetic slider component using PIXI.js

27 lines (22 loc) 662 B
function styleInject(css, { insertAt } = {}) { if (typeof document === 'undefined') return; const head = document.head || document.getElementsByTagName('head')[0]; const style = document.createElement('style'); style.type = 'text/css'; if (insertAt === 'top') { if (head.firstChild) { head.insertBefore(style, head.firstChild); } else { head.appendChild(style); } } else { head.appendChild(style); } if (style.styleSheet) { style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); } } export { styleInject as default }; //# sourceMappingURL=virtual_style-inject.js.map