From 30bea93dde22e6900b4b9a3c7226b2f3a6d6fdd0 Mon Sep 17 00:00:00 2001 From: Angaddeep Singh <159604852+Angxddeep@users.noreply.github.com> Date: Mon, 15 Jul 2024 22:29:25 +0530 Subject: [PATCH] [Wiki] Automatically enabling Dark/Light mode set by user's browser Preference (#2366) This allows the website to automatically switch to the theme set by the browser or the whole system. --- mkdocs.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index afe7ea72..c3590fdb 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -26,13 +26,15 @@ theme: logo: assets/favicon.png favicon: assets/favicon.png palette: - - scheme: default + - media: "(prefers-color-scheme: light)" + scheme: default toggle: icon: material/toggle-switch-off-outline name: Switch to dark mode primary: black accent: purple - - scheme: slate + - media: "(prefers-color-scheme: dark)" + scheme: slate toggle: icon: material/toggle-switch name: Switch to light mode