From 31a45a2e7a223ad0c45a7811d0acd0a195c6e3b4 Mon Sep 17 00:00:00 2001 From: Flook Peter Date: Fri, 14 Jun 2024 14:01:39 +0800 Subject: [PATCH] Use automatic detect prefer color scheme --- mkdocs.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index eb5fdf4..5add33f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -2,16 +2,23 @@ site_name: insta-infra theme: name: material palette: + # Palette toggle for automatic mode + - media: "(prefers-color-scheme)" + toggle: + icon: material/brightness-auto + name: Switch to light mode # Palette toggle for light mode - - scheme: default + - media: "(prefers-color-scheme: light)" + scheme: default toggle: icon: material/brightness-7 name: Switch to dark mode # Palette toggle for dark mode - - scheme: slate + - media: "(prefers-color-scheme: dark)" + scheme: slate toggle: icon: material/brightness-4 - name: Switch to light mode + name: Switch to system preference nav: - Home: index.md - Getting Started: getting-started.md