fix component preview styles

This commit is contained in:
Henry Jameson 2025-07-02 00:36:37 +03:00
commit 0d32a7ddac
7 changed files with 240 additions and 215 deletions

View file

@ -410,7 +410,7 @@ const AppearanceTab = {
this.compilationCache[key] = theme3
}
const styleEl = document.getElementById('theme-holder')
const styleEl = document.getElementById('theme-preview-holder')
const styleSheet = styleEl.sheet
styleSheet.insertRule([
'#theme-preview-',

View file

@ -729,7 +729,7 @@ export default {
// Apart from "hover" we can't really show how component looks like in
// certain states, so we have to fake them.
const simulatePseudoSelectors = (css, prefix) => css
.replace(prefix, '.component-preview .preview-block')
.replace(prefix, '.preview-block')
.replace(':active', '.preview-active')
.replace(':hover', '.preview-hover')
.replace(':active', '.preview-active')

View file

@ -155,12 +155,6 @@
</ul>
</div>
<div class="preview-container">
<!-- eslint-disable vue/no-v-html vue/no-v-text-v-html-on-component -->
<component
:is="'style'"
v-html="previewCss"
/>
<!-- eslint-enable vue/no-v-html vue/no-v-text-v-html-on-component -->
<ComponentPreview
class="component-preview"
:show-text="componentHas('Text')"