Fixed shared styles for new Lit components

This commit is contained in:
Andrii V 2025-12-09 22:23:40 +01:00
parent 36cf92ae8c
commit ee09aefa70
2 changed files with 15 additions and 0 deletions

View file

@ -1,4 +1,5 @@
import 'regenerator-runtime/runtime.js';
import './shared-styles.js';
import './channelstream-connection/channelstream-connection.js';
import './rhodecode-toast/rhodecode-toast.js';
import './rhodecode-unsafe-html/rhodecode-unsafe-html.js';

View file

@ -0,0 +1,14 @@
const styleElement = document.createElement('dom-module');
// this is a workaround to make shared styles work for Lit components.
// Needs proper refactoring to make sure styling follows Lit patterns
import sharedCSS from './style-lit.css';
styleElement.setAttribute('id', 'shared-styles');
styleElement.innerHTML =
`<template>
<style>
${sharedCSS}
</style>
</template>`;
document.head.appendChild(styleElement);