Documentation

This commit is contained in:
squidfunk 2021-03-09 22:27:47 +01:00
parent 5184ed9a4b
commit c0c3a8fbf5

View File

@ -195,7 +195,8 @@ theme:
palette: palette:
# Light mode # Light mode
- scheme: default - media: "(prefers-color-scheme: light)"
scheme: default
primary: indigo primary: indigo
accent: indigo accent: indigo
toggle: toggle:
@ -203,7 +204,8 @@ theme:
name: Switch to dark mode name: Switch to dark mode
# Dark mode # Dark mode
- scheme: slate - media: "(prefers-color-scheme: dark)"
scheme: slate
primary: blue primary: blue
accent: blue accent: blue
toggle: toggle:
@ -211,7 +213,9 @@ theme:
name: Switch to light mode name: Switch to light mode
``` ```
This will render a color palette toggle in the header next to the search bar: In order to set a default theme based on user preference, add a valid media
query to the `media` attribute. This will render a color palette toggle in the
header next to the search bar:
<figure markdown="1"> <figure markdown="1">