diff options
author | Simon L <szaimen@e.mail.de> | 2022-10-13 00:56:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-13 00:56:57 +0200 |
commit | cbe228ae3ae96c3bfa847a4441693aa21ca0a8bb (patch) | |
tree | 92c69cc0b2e849c01b395d5a58c571455cb0bb13 /apps/theming/lib/Themes | |
parent | 4c64a60823af82827ed5fe27911b0cde2f0c958e (diff) | |
parent | f1b38426e22507e8ee6f20f446f980fc1fc576ec (diff) | |
download | nextcloud-server-cbe228ae3ae96c3bfa847a4441693aa21ca0a8bb.tar.gz nextcloud-server-cbe228ae3ae96c3bfa847a4441693aa21ca0a8bb.zip |
Merge pull request #34545 from nextcloud/fix/theming-highcontrast-translucency-off
Disable translucency on high contrast themes
Diffstat (limited to 'apps/theming/lib/Themes')
-rw-r--r-- | apps/theming/lib/Themes/DarkHighContrastTheme.php | 4 | ||||
-rw-r--r-- | apps/theming/lib/Themes/HighContrastTheme.php | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/apps/theming/lib/Themes/DarkHighContrastTheme.php b/apps/theming/lib/Themes/DarkHighContrastTheme.php index 57d49ff4231..7b82136a56a 100644 --- a/apps/theming/lib/Themes/DarkHighContrastTheme.php +++ b/apps/theming/lib/Themes/DarkHighContrastTheme.php @@ -56,13 +56,15 @@ class DarkHighContrastTheme extends DarkTheme implements ITheme { $colorMainText = '#ffffff'; $colorMainBackground = '#000000'; + $colorMainBackgroundRGB = join(',', $this->util->hexToRGB($colorMainBackground)); return array_merge( $defaultVariables, $this->generatePrimaryVariables($colorMainBackground, $colorMainText), [ '--color-main-background' => $colorMainBackground, - '--color-main-background-translucent' => 'rgba(var(--color-main-background-rgb), .1)', + '--color-main-background-rgb' => $colorMainBackgroundRGB, + '--color-main-background-translucent' => 'rgba(var(--color-main-background-rgb), 1)', '--color-main-text' => $colorMainText, '--color-background-dark' => $this->util->lighten($colorMainBackground, 30), diff --git a/apps/theming/lib/Themes/HighContrastTheme.php b/apps/theming/lib/Themes/HighContrastTheme.php index d73fa4b7ea0..1ae848c866f 100644 --- a/apps/theming/lib/Themes/HighContrastTheme.php +++ b/apps/theming/lib/Themes/HighContrastTheme.php @@ -56,13 +56,15 @@ class HighContrastTheme extends DefaultTheme implements ITheme { $colorMainText = '#000000'; $colorMainBackground = '#ffffff'; + $colorMainBackgroundRGB = join(',', $this->util->hexToRGB($colorMainBackground)); return array_merge( $defaultVariables, $this->generatePrimaryVariables($colorMainBackground, $colorMainText), [ '--color-main-background' => $colorMainBackground, - '--color-main-background-translucent' => 'rgba(var(--color-main-background-rgb), .1)', + '--color-main-background-rgb' => $colorMainBackgroundRGB, + '--color-main-background-translucent' => 'rgba(var(--color-main-background-rgb), 1)', '--color-main-text' => $colorMainText, '--color-background-dark' => $this->util->darken($colorMainBackground, 30), |