diff --git a/htdocs/theme/eldy/btn.inc.php b/htdocs/theme/eldy/btn.inc.php index b29c55bd02d..28ae22e9696 100644 --- a/htdocs/theme/eldy/btn.inc.php +++ b/htdocs/theme/eldy/btn.inc.php @@ -18,7 +18,9 @@ if (!defined('ISLOADEDBYSTEELSHEET')) { if (!empty($conf->global->THEME_DARKMODEENABLED)) { print "/* For dark mode */\n"; if ($conf->global->THEME_DARKMODEENABLED != 2) { - print "@media (prefers-color-scheme: dark) {"; + print "@media (prefers-color-scheme: dark) {"; // To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes + } else { + print "@media not print {"; } print " :root { @@ -32,9 +34,7 @@ if (!empty($conf->global->THEME_DARKMODEENABLED)) { --textbutaction: rgb(255,255,255); }\n"; - if ($conf->global->THEME_DARKMODEENABLED != 2) { - print "}"; - } + print "}"; } ?> diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 7b942b27405..7736698a609 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -60,7 +60,7 @@ if (!empty($conf->global->THEME_DARKMODEENABLED)) { print "/* For dark mode */\n"; if ($conf->global->THEME_DARKMODEENABLED != 2) { - print "@media not print and (prefers-color-scheme: dark) {"; + print "@media (prefers-color-scheme: dark) {"; // To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes } else { print "@media not print {"; } diff --git a/htdocs/theme/md/btn.inc.php b/htdocs/theme/md/btn.inc.php index a668876b0a3..5ccd2e100dd 100644 --- a/htdocs/theme/md/btn.inc.php +++ b/htdocs/theme/md/btn.inc.php @@ -18,7 +18,9 @@ if (!defined('ISLOADEDBYSTEELSHEET')) { if (!empty($conf->global->THEME_DARKMODEENABLED)) { print "/* For dark mode */\n"; if ($conf->global->THEME_DARKMODEENABLED != 2) { - print "@media (prefers-color-scheme: dark) {"; + print "@media (prefers-color-scheme: dark) {"; // To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes + } else { + print "@media not print {"; } print " :root { @@ -32,9 +34,7 @@ if (!empty($conf->global->THEME_DARKMODEENABLED)) { --textbutaction: rgb(255,255,255); }\n"; - if ($conf->global->THEME_DARKMODEENABLED != 2) { - print "}"; - } + print "}"; } ?> diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index cb88c0815dc..ffc2bdc037a 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -360,7 +360,7 @@ print '*/'."\n"; if (!empty($conf->global->THEME_DARKMODEENABLED)) { print "/* For dark mode */\n"; if ($conf->global->THEME_DARKMODEENABLED != 2) { - print "@media not print and (prefers-color-scheme: dark) {"; + print "@media (prefers-color-scheme: dark) {"; // To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes } else { print "@media not print {"; }