diff options
author | d073103 <thomas.draebing@sap.com> | 2023-11-02 13:52:06 +0100 |
---|---|---|
committer | Thomas Dräbing <thomas.draebing@sap.com> | 2023-11-02 13:24:12 +0000 |
commit | ecc4f9582fb8f66f68837e4a3c323785211242c0 (patch) | |
tree | b26d8d377da1268dfcda2c936e58336818f8a59b | |
parent | ea3417d2c51d4ff83ed6f1358ef35f4b0383eb69 (diff) |
Make gr-modal-styles backward compatible with Polymer
The gr-modal-styles module could only be used by Lit Elements, but
not by old Polymer-based DOM modules. Since Polymer support has not
yet fully been removed, this change adds compatibility again.
Release-Notes: skip
Change-Id: I073c2768538454e41aee8e976f135921361fe772
-rw-r--r-- | polygerrit-ui/app/styles/gr-modal-styles.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/polygerrit-ui/app/styles/gr-modal-styles.ts b/polygerrit-ui/app/styles/gr-modal-styles.ts index b1bcf5124d..a8b5dc4798 100644 --- a/polygerrit-ui/app/styles/gr-modal-styles.ts +++ b/polygerrit-ui/app/styles/gr-modal-styles.ts @@ -28,3 +28,13 @@ export const modalStyles = css` opacity: var(--modal-opacity, 0.6); } `; + +const $_documentContainer = document.createElement('template'); +$_documentContainer.innerHTML = `<dom-module id="gr-modal-styles"> + <template> + <style> + ${modalStyles.cssText} + </style> + </template> +</dom-module>`; +document.head.appendChild($_documentContainer.content); |