Fixed shared styles for new Lit components
This commit is contained in:
parent
36cf92ae8c
commit
ee09aefa70
2 changed files with 15 additions and 0 deletions
|
|
@ -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';
|
||||
|
|
|
|||
14
rhodecode/public/js/src/components/shared-styles.js
Normal file
14
rhodecode/public/js/src/components/shared-styles.js
Normal 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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue