Skip to content

Commit

Permalink
Added dark color scheme for docs (#2913)
Browse files Browse the repository at this point in the history
* Added dark color scheme for docs

Added alternative, dark color scheme for docs, which should be automatically activated if user's browser presents the `prefers-color-scheme: dark` media query.

* switch icons

* add change file

Co-authored-by: PrettyWood <em.jolibois@gmail.com>
  • Loading branch information
gbdlin and PrettyWood committed Sep 4, 2021
1 parent e431604 commit abbad5e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions changes/2913-gbdlin.md
@@ -0,0 +1 @@
add a dark mode to _pydantic_ documentation
13 changes: 13 additions & 0 deletions mkdocs.yml
Expand Up @@ -7,8 +7,21 @@ theme:
name: 'material'
custom_dir: 'docs/theme'
palette:
- media: "(prefers-color-scheme: light)"
scheme: default
primary: pink
accent: pink
toggle:
icon: material/lightbulb-outline
name: "Switch to dark mode"
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: pink
accent: pink
toggle:
icon: material/lightbulb
name: "Switch to light mode"

logo: 'logo-white.svg'
favicon: 'favicon.png'

Expand Down

0 comments on commit abbad5e

Please sign in to comment.