Merge branch 'fix-style-editors' into shigusegubu-themes3

This commit is contained in:
Henry Jameson 2025-07-03 10:43:21 +03:00
commit b6ed146b5a
4 changed files with 7 additions and 3 deletions

View file

View file

@ -1,8 +1,8 @@
<template>
<div
:id="'component-preview-' + randomSeed"
class="ComponentPreview"
:class="{ '-shadow-controls': shadowControl }"
:id="'component-preview-' + randomSeed"
>
<label
v-show="shadowControl"

View file

@ -703,6 +703,7 @@ export default {
'&'
).join('\n')
sheet.clear()
sheet.addRule('#theme-preview {\n' + rule + '\n}')
sheet.ready = true
adoptStyleSheets()

View file

@ -19,9 +19,12 @@ export const createStyleSheet = (id) => {
this.rules = []
},
addRule (rule) {
let newRule = rule
if (!CSS.supports?.('backdrop-filter', 'blur()')) {
newRule = newRule.replace(/backdrop-filter:[^;]+;/g, '') // Remove backdrop-filter
}
this.rules.push(
rule
.replace(/backdrop-filter:[^;]+;/g, '') // Remove backdrop-filter
newRule
.replace(/var\(--shadowFilter\)[^;]*;/g, '') // Remove shadowFilter references
)
}