Skip to content

Commit 1daba7d

Browse files
authored
feat(docs): update MkDocs palette toggle configuration (#211)
- Added support for automatic mode palette toggle with improved icons. - Removed deprecated `navigation.tabs.sticky` option. - Updated light and dark mode toggle settings with contextual media queries.
1 parent 84e5070 commit 1daba7d

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

mkdocs.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ theme:
1919
- navigation.footer
2020
- navigation.top
2121
- navigation.tabs
22-
- navigation.tabs.sticky
2322
- navigation.expand
2423
- navigation.path
2524
- navigation.indexes
@@ -32,21 +31,29 @@ theme:
3231
- content.code.annotate
3332

3433
palette:
34+
# Palette toggle for automatic mode
35+
- media: "(prefers-color-scheme)"
36+
toggle:
37+
icon: material/lightbulb-auto
38+
name: Switch to light mode
39+
3540
# Palette toggle for light mode
3641
- scheme: default
3742
primary: orange
3843
accent: orange
44+
media: "(prefers-color-scheme: light)"
3945
toggle:
40-
icon: material/brightness-7
46+
icon: material/lightbulb
4147
name: Switch to dark mode
4248

4349

4450
# Palette toggle for dark mode
4551
- scheme: slate
4652
primary: black
4753
accent: orange
54+
media: "(prefers-color-scheme: dark)"
4855
toggle:
49-
icon: material/brightness-4
56+
icon: material/lightbulb-outline
5057
name: Switch to light mode
5158
font:
5259
code: JetBrains Mono

0 commit comments

Comments
 (0)