Skip to content

Commit e11799a

Browse files
committed
Use the system default light/dark theme as preferred by the browser. With possibilty to override.
This respects the user's choice of light/dark and no longer forces the dark theme.
1 parent 3b6b1cf commit e11799a

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

mkdocs.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,20 @@ theme:
66
- content.code.copy
77
- toc.integrate
88
palette:
9-
scheme: slate
9+
- media: "(prefers-color-scheme)"
10+
toggle:
11+
icon: material/brightness-auto
12+
name: Switch to light mode
13+
- media: "(prefers-color-scheme: light)"
14+
scheme: default
15+
toggle:
16+
icon: material/brightness-7
17+
name: Switch to dark mode
18+
- media: "(prefers-color-scheme: dark)"
19+
scheme: slate
20+
toggle:
21+
icon: material/brightness-4
22+
name: Switch to system preference
1023
icon:
1124
logo: material/code-tags
1225
nav:

0 commit comments

Comments
 (0)