diff --git a/templates/zerver/app/index.html b/templates/zerver/app/index.html
index 0d5f13afa0..365cfc9129 100644
--- a/templates/zerver/app/index.html
+++ b/templates/zerver/app/index.html
@@ -47,13 +47,16 @@
animation-fill-mode: forwards;
visibility: hidden;
}
- :root.color-scheme-automatic #app-loading {
- color: hsl(0, 0%, 20%);
- }
:root.dark-theme #app-loading {
background-color: hsl(212, 28%, 18%);
color: hsl(236, 33%, 90%);
}
+ @media (prefers-color-scheme: dark) {
+ :root.color-scheme-automatic #app-loading {
+ background-color: hsl(212, 28%, 18%);
+ color: hsl(236, 33%, 90%);
+ }
+ }
.app-loading-spinner-container {
position: relative;