Merge branch 'firefix' into 'develop'
Fix firefox and theme change not working See merge request pleroma/pleroma-fe!2198
This commit is contained in:
commit
e1cbb1ccd2
1 changed files with 7 additions and 0 deletions
|
|
@ -24,6 +24,11 @@ export const createStyleSheet = (id, priority = 1000) => {
|
||||||
if (!CSS.supports?.('backdrop-filter', 'blur()')) {
|
if (!CSS.supports?.('backdrop-filter', 'blur()')) {
|
||||||
newRule = newRule.replace(/backdrop-filter:[^;]+;/g, '') // Remove backdrop-filter
|
newRule = newRule.replace(/backdrop-filter:[^;]+;/g, '') // Remove backdrop-filter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// firefox doesn't like invalid selectors
|
||||||
|
if (!CSS.supports?.('selector(::-webkit-scrollbar)') && newRule.startsWith('::-webkit')) {
|
||||||
|
return
|
||||||
|
}
|
||||||
this.rules.push(
|
this.rules.push(
|
||||||
newRule
|
newRule
|
||||||
.replace(/var\(--shadowFilter\)[^;]*;/g, '') // Remove shadowFilter references
|
.replace(/var\(--shadowFilter\)[^;]*;/g, '') // Remove shadowFilter references
|
||||||
|
|
@ -156,6 +161,8 @@ export const applyTheme = (
|
||||||
const eagerStyles = createStyleSheet(EAGER_STYLE_ID, 10)
|
const eagerStyles = createStyleSheet(EAGER_STYLE_ID, 10)
|
||||||
const lazyStyles = createStyleSheet(LAZY_STYLE_ID, 20)
|
const lazyStyles = createStyleSheet(LAZY_STYLE_ID, 20)
|
||||||
|
|
||||||
|
eagerStyles.clear()
|
||||||
|
lazyStyles.clear()
|
||||||
|
|
||||||
const { lazyProcessFunc } = generateTheme(
|
const { lazyProcessFunc } = generateTheme(
|
||||||
input,
|
input,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue