remove backdrop-filter only if unsupported
This commit is contained in:
parent
a635f025be
commit
7bc5dd440b
2 changed files with 6 additions and 2 deletions
|
|
@ -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
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue