mirror of
https://github.com/wavetermdev/docusaurus-og.git
synced 2026-08-05 13:46:35 -07:00
fix: prevent screen flash by loading css vars for both dark and light theme in initial load
This commit is contained in:
@@ -36,7 +36,7 @@ const useTheme = () => {
|
||||
const useThemeCssVars = (theme: Theme, light: boolean = false) =>
|
||||
useMemo(
|
||||
() => css`
|
||||
[data-theme='${light ? 'light' : 'dark'}'] {
|
||||
[data-theme=${light ? 'light' : 'dark'}] {
|
||||
${theme.cssVars}
|
||||
}
|
||||
`,
|
||||
|
||||
Reference in New Issue
Block a user