UNPKG

dap-design-system

Version:

Official design system for the DÁP (dap.gov.hu)

17 lines (16 loc) 732 B
const a = (c) => { const e = window, d = e.ShadowRoot && (e.ShadyCSS === void 0 || e.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, o = c.constructor.styles, n = Array.isArray(o) ? o : o ? [o] : [], l = n.map((t) => t.cssText).join(` `); if (d) { const t = new CSSStyleSheet(); t.replace(l), document.adoptedStyleSheets = [...document.adoptedStyleSheets, t]; } else n.forEach((t) => { const s = document.createElement("style"), S = e.litNonce; S !== void 0 && s.setAttribute("nonce", S), s.textContent = t.cssText, document.head.appendChild(s); }); }; export { a as adoptLightStyles }; //# sourceMappingURL=adopt-light-styles.js.map