From 6d829bce7993795ecaa7c89206afb904948f4cb5 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed, 27 Nov 2024 22:12:59 -0800 Subject: [PATCH] Enhancement: use css color-scheme (#4349) --- src/pages/index.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/index.jsx b/src/pages/index.jsx index 7a7fdef0..3f8ebf86 100644 --- a/src/pages/index.jsx +++ b/src/pages/index.jsx @@ -452,6 +452,7 @@ function Home({ initialSettings }) { } export default function Wrapper({ initialSettings, fallback }) { + const { theme } = useContext(ThemeContext); const wrappedStyle = {}; let backgroundBlur = false; let backgroundSaturate = false; @@ -482,8 +483,9 @@ export default function Wrapper({ initialSettings, fallback }) { id="page_wrapper" className={classNames( "relative", - initialSettings.theme && initialSettings.theme, + theme && theme, initialSettings.color && `theme-${initialSettings.color}`, + theme === "dark" ? "scheme-dark" : "scheme-light", )} >