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> <template>
<div <div
:id="'component-preview-' + randomSeed"
class="ComponentPreview" class="ComponentPreview"
:class="{ '-shadow-controls': shadowControl }" :class="{ '-shadow-controls': shadowControl }"
:id="'component-preview-' + randomSeed"
> >
<label <label
v-show="shadowControl" v-show="shadowControl"

View file

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

View file

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