From 95d24a0d0426a456a09a941f3f020e31906e524c Mon Sep 17 00:00:00 2001 From: jmkdev <21228906+jmkd3v@users.noreply.github.com> Date: Thu, 15 Feb 2024 17:09:54 -0500 Subject: [PATCH] automatic theme changing --- mkdocs.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index 29c7ec0e..3b6c13c9 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -18,13 +18,18 @@ theme: repo: fontawesome/brands/github palette: + - media: "(prefers-color-scheme)" + toggle: + icon: material/brightness-auto + name: Switch to light theme + - media: "(prefers-color-scheme: light)" scheme: default primary: white accent: blue toggle: icon: material/brightness-7 - name: Switch to dark mode + name: Switch to dark theme - media: "(prefers-color-scheme: dark)" scheme: slate @@ -32,7 +37,7 @@ theme: accent: blue toggle: icon: material/brightness-3 - name: Switch to light mode + name: Switch to automatic theme features: - content.code.annotate