From 89f512475438f37473689fb2226af4ae9298f4db Mon Sep 17 00:00:00 2001 From: Emile Hofsink Date: Fri, 22 Apr 2022 11:56:10 +1000 Subject: [PATCH] feat: Enabling Dark Mode + Slider :night_with_stars: :flashlight: Enabled Dark Mode and a slider. Dark mode setting will default to System values, but can be overridden with the slider. --- docs/stylesheets/bootstrap.css | 3 +++ mkdocs.yml | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/stylesheets/bootstrap.css b/docs/stylesheets/bootstrap.css index 70b4311..8c030b7 100644 --- a/docs/stylesheets/bootstrap.css +++ b/docs/stylesheets/bootstrap.css @@ -2589,6 +2589,9 @@ html { margin-bottom: 5px; font-weight: 700; } + label:is(.md-header__button) { + display: none; + } input[type="search"] { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; diff --git a/mkdocs.yml b/mkdocs.yml index 50cc885..249ee9f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -13,8 +13,18 @@ theme: name: material custom_dir: _includes/overrides palette: - scheme: default - accent: light blue + - media: "(prefers-color-scheme: light)" + scheme: default + accent: light blue + toggle: + icon: material/toggle-switch + name: Switch to dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + accent: light blue + toggle: + icon: material/toggle-switch-off-outline + name: Switch to light mode logo: assets/logo.png favicon: assets/favicon.ico icon: