diff options
Diffstat (limited to 'apps/theming')
-rw-r--r-- | apps/theming/css/default.css | 1 | ||||
-rw-r--r-- | apps/theming/lib/Themes/DarkTheme.php | 1 | ||||
-rw-r--r-- | apps/theming/lib/Themes/DefaultTheme.php | 18 |
3 files changed, 11 insertions, 9 deletions
diff --git a/apps/theming/css/default.css b/apps/theming/css/default.css index 262af7a3b83..fb541b7aca9 100644 --- a/apps/theming/css/default.css +++ b/apps/theming/css/default.css @@ -58,4 +58,5 @@ --breakpoint-mobile: 1024px; --primary-invert-if-bright: no; --background-invert-if-dark: no; + --background-invert-if-bright: invert(100%); } diff --git a/apps/theming/lib/Themes/DarkTheme.php b/apps/theming/lib/Themes/DarkTheme.php index bcf4bf695d4..dd894635751 100644 --- a/apps/theming/lib/Themes/DarkTheme.php +++ b/apps/theming/lib/Themes/DarkTheme.php @@ -91,6 +91,7 @@ class DarkTheme extends DefaultTheme implements ITheme { '--color-border-dark' => $this->util->lighten($colorMainBackground, 14), '--background-invert-if-dark' => 'invert(100%)', + '--background-invert-if-bright' => 'no', ]); } } diff --git a/apps/theming/lib/Themes/DefaultTheme.php b/apps/theming/lib/Themes/DefaultTheme.php index c822b3052ce..df444ebe2d2 100644 --- a/apps/theming/lib/Themes/DefaultTheme.php +++ b/apps/theming/lib/Themes/DefaultTheme.php @@ -188,22 +188,22 @@ class DefaultTheme implements ITheme { // other theme with media queries '--primary-invert-if-bright' => $this->util->invertTextColor($this->primaryColor) ? 'invert(100%)' : 'no', '--background-invert-if-dark' => 'no', + '--background-invert-if-bright' => 'invert(100%)', ]; // Register image variables only if custom-defined $backgroundDeleted = $this->config->getAppValue('theming', 'backgroundMime', '') === 'backgroundColor'; foreach(['logo', 'logoheader', 'favicon', 'background'] as $image) { - if ($this->imageManager->hasImage($image)) { - // If primary as background has been request, let's not define the background image - if ($image === 'background' && $backgroundDeleted) { - $variables["--image-background-plain"] = 'true'; - continue; - } else if ($image === 'background') { - $variables['--image-background-size'] = 'cover'; - } - $variables["--image-$image"] = "url('".$this->imageManager->getImageUrl($image)."')"; + // If primary as background has been request, let's not define the background image + if ($image === 'background' && $backgroundDeleted) { + $variables["--image-background-plain"] = 'true'; + continue; + } else if ($image === 'background') { + $variables['--image-background-size'] = 'cover'; } + $variables["--image-$image"] = "url('".$this->imageManager->getImageUrl($image)."')"; } + $variables["--image-login-background"] = $variables["--image-background"]; if ($hasCustomLogoHeader) { $variables["--image-logoheader-custom"] = 'true'; |