From a086c3c36a33910dd7181f0f34eba6308358df34 Mon Sep 17 00:00:00 2001 From: Michael Brewer Date: Tue, 8 Jun 2021 21:59:52 -0700 Subject: [PATCH] docs: dark mode Something like this would be easier on the eyes when most of the time you are coding in dark mode style themes --- docs/stylesheets/extra.css | 8 ++++++++ mkdocs.yml | 12 +++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index 831c864fd5f..f24b32faa14 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -4,6 +4,10 @@ .highlight .hll { background-color: lavender + + [data-md-color-scheme="slate"] { + background-color: rgb(69, 48, 164) + } } .md-typeset table:not([class]) { @@ -25,3 +29,7 @@ .md-typeset .admonition, .md-typeset details { font-size: 0.70rem } + +[data-md-color-scheme="slate"] { + --md-typeset-a-color: rgb(28, 152, 152) +} diff --git a/mkdocs.yml b/mkdocs.yml index 0a761ad9540..7ee0fd56236 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -29,7 +29,17 @@ nav: theme: name: material palette: - primary: deep purple + - scheme: default + primary: deep purple + toggle: + icon: material/toggle-switch-off-outline + name: Switch to dark mode + - scheme: slate + primary: indigo + accent: teal + toggle: + icon: material/toggle-switch + name: Switch to light mode features: - navigation.sections - navigation.expand