From f4f4e93217c5bd1701615897d79c3c57789b9346 Mon Sep 17 00:00:00 2001 From: Hossein Mehrabi Date: Mon, 12 Jun 2023 03:55:23 +0330 Subject: [PATCH] fix: prevent screen flash by loading css vars for both dark and light theme in initial load --- packages/logos-docusaurus-theme/src/client/theme/Root.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/logos-docusaurus-theme/src/client/theme/Root.tsx b/packages/logos-docusaurus-theme/src/client/theme/Root.tsx index beec17b..9a46743 100644 --- a/packages/logos-docusaurus-theme/src/client/theme/Root.tsx +++ b/packages/logos-docusaurus-theme/src/client/theme/Root.tsx @@ -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} } `,