From c8fa515ed5c7022938f5491e5301967ef242da1f Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Thu, 17 Apr 2025 17:23:57 +0200 Subject: [PATCH] CSS: Switch between independent adminer[-dark].css --- adminer/include/design.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/adminer/include/design.inc.php b/adminer/include/design.inc.php index 9f16c7c2..d32e75e4 100644 --- a/adminer/include/design.inc.php +++ b/adminer/include/design.inc.php @@ -52,7 +52,11 @@ function page_header(string $title, string $error = "", $breadcrumb = array(), s echo "\n"; } foreach ($css as $url => $mode) { - echo "\n"; + $attrs = ($mode == 'dark' && !$dark + ? $media + : ($mode == 'light' && $has_dark ? " media='(prefers-color-scheme: light)'" : "") + ); + echo "\n"; } echo "\nbodyClass();