From 9576701d8532b9697df62c96d7c8676afd985b2d Mon Sep 17 00:00:00 2001
From: Andrew G. Dunn <andrew@dunn.dev>
Date: Mon, 02 Mar 2026 16:31:53 +0000
Subject: [PATCH] fix: await micromorph() to prevent race condition with nav event handlers (#2323)

---
 quartz/components/styles/darkmode.scss |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/quartz/components/styles/darkmode.scss b/quartz/components/styles/darkmode.scss
index edf4e61..e0999c7 100644
--- a/quartz/components/styles/darkmode.scss
+++ b/quartz/components/styles/darkmode.scss
@@ -5,9 +5,10 @@
   background: none;
   border: none;
   width: 20px;
-  height: 20px;
-  margin: 0 10px;
+  height: 32px;
+  margin: 0;
   text-align: inherit;
+  flex-shrink: 0;
 
   & svg {
     position: absolute;
@@ -28,19 +29,19 @@
 }
 
 :root[saved-theme="dark"] .darkmode {
-  & > #dayIcon {
+  & > .dayIcon {
     display: none;
   }
-  & > #nightIcon {
+  & > .nightIcon {
     display: inline;
   }
 }
 
 :root .darkmode {
-  & > #dayIcon {
+  & > .dayIcon {
     display: inline;
   }
-  & > #nightIcon {
+  & > .nightIcon {
     display: none;
   }
 }

--
Gitblit v1.10.0