Skip to content

Commit 1360771

Browse files
authored
Merge pull request #34567 from nextcloud/backport/34545/stable25
[stable25] Disable translucency on high contrast themes
2 parents 3993829 + 5e2c5e5 commit 1360771

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

apps/theming/lib/Themes/DarkHighContrastTheme.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,15 @@ public function getCSSVariables(): array {
5656

5757
$colorMainText = '#ffffff';
5858
$colorMainBackground = '#000000';
59+
$colorMainBackgroundRGB = join(',', $this->util->hexToRGB($colorMainBackground));
5960

6061
return array_merge(
6162
$defaultVariables,
6263
$this->generatePrimaryVariables($colorMainBackground, $colorMainText),
6364
[
6465
'--color-main-background' => $colorMainBackground,
65-
'--color-main-background-translucent' => 'rgba(var(--color-main-background-rgb), .1)',
66+
'--color-main-background-rgb' => $colorMainBackgroundRGB,
67+
'--color-main-background-translucent' => 'rgba(var(--color-main-background-rgb), 1)',
6668
'--color-main-text' => $colorMainText,
6769

6870
'--color-background-dark' => $this->util->lighten($colorMainBackground, 30),

apps/theming/lib/Themes/HighContrastTheme.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,15 @@ public function getCSSVariables(): array {
5656

5757
$colorMainText = '#000000';
5858
$colorMainBackground = '#ffffff';
59+
$colorMainBackgroundRGB = join(',', $this->util->hexToRGB($colorMainBackground));
5960

6061
return array_merge(
6162
$defaultVariables,
6263
$this->generatePrimaryVariables($colorMainBackground, $colorMainText),
6364
[
6465
'--color-main-background' => $colorMainBackground,
65-
'--color-main-background-translucent' => 'rgba(var(--color-main-background-rgb), .1)',
66+
'--color-main-background-rgb' => $colorMainBackgroundRGB,
67+
'--color-main-background-translucent' => 'rgba(var(--color-main-background-rgb), 1)',
6668
'--color-main-text' => $colorMainText,
6769

6870
'--color-background-dark' => $this->util->darken($colorMainBackground, 30),

0 commit comments

Comments
 (0)