From 929556b801b6402bda5e4b20b28965afb47156db Mon Sep 17 00:00:00 2001 From: DrMint <29893320+DrMint@users.noreply.github.com> Date: Mon, 27 May 2024 19:27:54 +0200 Subject: [PATCH] Fix bugged auto light mode --- src/components/AppLayout/components/Html.astro | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/AppLayout/components/Html.astro b/src/components/AppLayout/components/Html.astro index c0118d2..01223be 100644 --- a/src/components/AppLayout/components/Html.astro +++ b/src/components/AppLayout/components/Html.astro @@ -301,8 +301,14 @@ const { currentTheme } = Astro.locals; color: var(--color-base-1000); } - @media (prefers-color-scheme: dark) { - html:not(.manual-theme) { + html:not(.manual-theme) { + @media (prefers-color-scheme: light) { + & .when-dark-theme { + display: none !important; + } + } + + @media (prefers-color-scheme: dark) { --color-base-1000: #ebeae7; --color-base-950: #eae5e0; --color-base-900: #e8dfd8;