Skip to content

Commit

Permalink
Added dark color scheme for docs (pydantic#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
2 people authored and jpribyl committed Oct 7, 2021
1 parent 677e37e commit 3d3a71d
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 3d3a71d

Please sign in to comment.