Skip to content

Commit 80f96ce

Browse files
Auto enable dark mode on no-js
1 parent 1f0b623 commit 80f96ce

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

src/theme/css/variables.css

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,3 +208,45 @@
208208
--searchresults-li-bg: #dec2a2;
209209
--search-mark-bg: #e69f67;
210210
}
211+
212+
@media (prefers-color-scheme: dark) {
213+
.no-js {
214+
--bg: hsl(200, 7%, 8%);
215+
--fg: #98a3ad;
216+
217+
--sidebar-bg: #292c2f;
218+
--sidebar-fg: #a1adb8;
219+
--sidebar-non-existant: #505254;
220+
--sidebar-active: #3473ad;
221+
--sidebar-spacer: #393939;
222+
223+
--scrollbar: var(--sidebar-fg);
224+
225+
--icons: #43484d;
226+
--icons-hover: #b3c0cc;
227+
228+
--links: #2b79a2;
229+
230+
--inline-code-color: #c5c8c6;;
231+
232+
--theme-popup-bg: #141617;
233+
--theme-popup-border: #43484d;
234+
--theme-hover: #1f2124;
235+
236+
--quote-bg: hsl(234, 21%, 18%);
237+
--quote-border: hsl(234, 21%, 23%);
238+
239+
--table-border-color: hsl(200, 7%, 13%);
240+
--table-header-bg: hsl(200, 7%, 28%);
241+
--table-alternate-bg: hsl(200, 7%, 11%);
242+
243+
--searchbar-border-color: #aaa;
244+
--searchbar-bg: #b7b7b7;
245+
--searchbar-fg: #000;
246+
--searchbar-shadow-color: #aaa;
247+
--searchresults-header-fg: #666;
248+
--searchresults-border-color: #98a3ad;
249+
--searchresults-li-bg: #2b2b2f;
250+
--search-mark-bg: #355c7d;
251+
}
252+
}

0 commit comments

Comments
 (0)