Compare commits

...

4 commits

Author SHA1 Message Date
Henry Jameson
33a0e4b2b9 Merge branch 'firefix' into shigusegubu-themes3 2025-07-17 17:57:38 +03:00
Henry Jameson
04ee1a892c proper detection 2025-07-17 17:55:20 +03:00
Henry Jameson
23975b506e fix theme change not working 2025-07-17 17:50:38 +03:00
Henry Jameson
c12e1a69cf fix firefox 2025-07-17 17:32:09 +03:00

View file

@ -24,6 +24,11 @@ export const createStyleSheet = (id, priority = 1000) => {
if (!CSS.supports?.('backdrop-filter', 'blur()')) {
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(
newRule
.replace(/var\(--shadowFilter\)[^;]*;/g, '') // Remove shadowFilter references
@ -156,6 +161,8 @@ export const applyTheme = (
const eagerStyles = createStyleSheet(EAGER_STYLE_ID, 10)
const lazyStyles = createStyleSheet(LAZY_STYLE_ID, 20)
eagerStyles.clear()
lazyStyles.clear()
const { lazyProcessFunc } = generateTheme(
input,