diff --git a/bskyweb/templates/base.html b/bskyweb/templates/base.html
index b03fbbee..55c7c9fd 100644
--- a/bskyweb/templates/base.html
+++ b/bskyweb/templates/base.html
@@ -71,6 +71,7 @@
overflow-y: auto;
overscroll-behavior-y: none;
text-rendering: optimizeLegibility;
+ background-color: var(--background);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-ms-overflow-style: scrollbar;
diff --git a/src/state/shell/color-mode.tsx b/src/state/shell/color-mode.tsx
index c6a4b8a1..192b8831 100644
--- a/src/state/shell/color-mode.tsx
+++ b/src/state/shell/color-mode.tsx
@@ -23,6 +23,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
)
React.useEffect(() => {
+ updateDocument(persisted.get('colorMode')) // set on load
return persisted.onUpdate(() => {
setState(persisted.get('colorMode'))
updateDocument(persisted.get('colorMode'))
diff --git a/web/index.html b/web/index.html
index 1a9d63b8..18b985bf 100644
--- a/web/index.html
+++ b/web/index.html
@@ -75,6 +75,7 @@
overflow-y: auto;
overscroll-behavior-y: none;
text-rendering: optimizeLegibility;
+ background-color: var(--background);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-ms-overflow-style: scrollbar;