move darkMode_auto from body to html root (#5397)

This commit is contained in:
maTh
2023-05-14 19:24:12 +02:00
committed by GitHub
parent e65f399daa
commit cd004cb978
3 changed files with 7 additions and 5 deletions

View File

@@ -4,10 +4,12 @@
?>
<!DOCTYPE html>
<html lang="<?= FreshRSS_Context::$user_conf->language ?>" xml:lang="<?= FreshRSS_Context::$user_conf->language ?>"<?php
$class = '';
if (_t('gen.dir') === 'rtl') {
echo ' dir="rtl" class="rtl"';
echo ' dir="rtl"';
$class = 'rtl ';
}
?>>
?> class="<?= $class ?><?= (FreshRSS_Context::$user_conf->darkMode === 'no') ? '' : 'darkMode_' . FreshRSS_Context::$user_conf->darkMode ?>">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
@@ -53,7 +55,7 @@ if (_t('gen.dir') === 'rtl') {
<meta name="robots" content="noindex,nofollow" />
<?php } ?>
</head>
<body class="<?= Minz_Request::actionName() ?><?= (FreshRSS_Context::$user_conf->darkMode === 'no') ? '' : ' darkMode_' . FreshRSS_Context::$user_conf->darkMode ?>">
<body class="<?= Minz_Request::actionName() ?>">
<?php
if (!Minz_Request::paramBoolean('ajax')) {
flush();

View File

@@ -1182,7 +1182,7 @@ a.btn-attention:hover {
}
@media screen and (prefers-color-scheme: dark) {
:root .darkMode_auto {
:root.darkMode_auto {
--frss-background-color: #000;
--frss-background-color-middle: #222;
--frss-border-color: #444;

View File

@@ -1182,7 +1182,7 @@ a.btn-attention:hover {
}
@media screen and (prefers-color-scheme: dark) {
:root .darkMode_auto {
:root.darkMode_auto {
--frss-background-color: #000;
--frss-background-color-middle: #222;
--frss-border-color: #444;