Skip to content

Commit

Permalink
Merge pull request #16951 from moshevayner/docs-site-dark-mode
Browse files Browse the repository at this point in the history
feat(docs): add toggle for light/dark mode support
  • Loading branch information
k8s-ci-robot authored Nov 20, 2024
2 parents f5e92f2 + 2b1d197 commit 05a6517
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,28 @@ theme:
logo: 'material/cloud-outline'
favicon: 'img/logo-notext.svg'
palette:
primary: 'teal'
accent: 'green'
# 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
primary: 'teal'
accent: 'green'
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: Match OS theme (Automatic)

plugins:
- search
- macros:
Expand Down

0 comments on commit 05a6517

Please sign in to comment.