Skip to content

Commit

Permalink
docs: allow for toggling light/dark mode (#2869)
Browse files Browse the repository at this point in the history
  • Loading branch information
itzg authored Jun 2, 2024
1 parent 820d401 commit b3e0ea1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,27 @@ theme:
- navigation.top
- navigation.indexes
locale: en
palette:

# Palette toggle for automatic mode
- media: "(prefers-color-scheme)"
toggle:
icon: material/brightness-auto
name: Switch to light mode

# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/brightness-7
name: Switch to dark mode

# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/brightness-4
name: Switch to system preference

highlightjs: true
hljs_languages:
Expand Down

0 comments on commit b3e0ea1

Please sign in to comment.