summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authord073103 <thomas.draebing@sap.com>2023-11-02 13:52:06 +0100
committerThomas Dräbing <thomas.draebing@sap.com>2023-11-02 13:24:12 +0000
commitecc4f9582fb8f66f68837e4a3c323785211242c0 (patch)
treeb26d8d377da1268dfcda2c936e58336818f8a59b
parentea3417d2c51d4ff83ed6f1358ef35f4b0383eb69 (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.ts10
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);