Skip to content

Commit 507c91b

Browse files
committed
Readded support for dark/light theme
Signed-off-by: Raul Kele <[email protected]>
1 parent a75cccb commit 507c91b

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

docs/stylesheets/custom.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
.default-bg {
22
background: none!important;
3-
background-color:hsla(232,15%,21%,1)!important;
3+
background-color: var(--md-default-bg-color)!important;
44
}
55

6+
67
.content-container-centered {
78
padding: 5.2rem 0;
89
margin: 0 0.8rem;
@@ -29,7 +30,7 @@
2930
}
3031

3132
.centered-content-grid ul.centered-content-grid__list > li.centered-content-grid__item div.item_content{
32-
color: hsla(232,75%,95%,1)!important;
33+
color: var(--md-typeset-color)!important;
3334
}
3435

3536

mkdocs.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,20 @@ theme:
99
name: material
1010
custom_dir: material
1111
palette:
12-
scheme: slate
13-
primary: black
14-
accent: teal
12+
- scheme: slate
13+
toggle:
14+
name: Light Mode
15+
icon: material/toggle-switch-off-outline
16+
primary: black
17+
accent: lime
18+
media: "(prefers-color-scheme: dark)"
19+
- scheme: default
20+
toggle:
21+
name: Dark Mode
22+
icon: material/toggle-switch
23+
primary: black
24+
accent: teal
25+
media: "(prefers-color-scheme: light)"
1526
favicon: assets/images/favicon.png
1627
logo: assets/images/logo.png
1728
features:

0 commit comments

Comments
 (0)