File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ import { SEO } from 'astro-seo'
43
43
// Force light mode by ensuring data-theme is always 'light'
44
44
// This overrides any system preferences or theme switching attempts
45
45
document.documentElement.setAttribute('data-theme', 'light')
46
-
46
+
47
47
// Watch for any attempts to change the theme and override them
48
48
const observer = new MutationObserver((mutations) => {
49
49
mutations.forEach((mutation) => {
@@ -55,9 +55,9 @@ import { SEO } from 'astro-seo'
55
55
}
56
56
})
57
57
})
58
-
58
+
59
59
observer.observe(document.documentElement, {
60
60
attributes: true,
61
- attributeFilter: ['data-theme']
61
+ attributeFilter: ['data-theme'],
62
62
})
63
63
</script >
Original file line number Diff line number Diff line change 32
32
}
33
33
34
34
/* Additional safeguard: if any element somehow gets dark theme styles, override them */
35
- [data-theme = " dark" ] * {
35
+ [data-theme = ' dark' ] * {
36
36
color-scheme : light !important ;
37
37
}
38
38
You can’t perform that action at this time.
0 commit comments