Skip to content

Commit a086c3c

Browse files
author
Michael Brewer
committed
docs: dark mode
Something like this would be easier on the eyes when most of the time you are coding in dark mode style themes
1 parent 8724294 commit a086c3c

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

docs/stylesheets/extra.css

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
.highlight .hll {
66
background-color: lavender
7+
8+
[data-md-color-scheme="slate"] {
9+
background-color: rgb(69, 48, 164)
10+
}
711
}
812

913
.md-typeset table:not([class]) {
@@ -25,3 +29,7 @@
2529
.md-typeset .admonition, .md-typeset details {
2630
font-size: 0.70rem
2731
}
32+
33+
[data-md-color-scheme="slate"] {
34+
--md-typeset-a-color: rgb(28, 152, 152)
35+
}

mkdocs.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,17 @@ nav:
2929
theme:
3030
name: material
3131
palette:
32-
primary: deep purple
32+
- scheme: default
33+
primary: deep purple
34+
toggle:
35+
icon: material/toggle-switch-off-outline
36+
name: Switch to dark mode
37+
- scheme: slate
38+
primary: indigo
39+
accent: teal
40+
toggle:
41+
icon: material/toggle-switch
42+
name: Switch to light mode
3343
features:
3444
- navigation.sections
3545
- navigation.expand

0 commit comments

Comments
 (0)