Skip to content

Commit badf09b

Browse files
authored
Merge pull request #35549 from nextcloud/enh/a11y-contrast-borders
Add new border color variable and adjust primary color for increased contrast
2 parents c38fded + 1c753c2 commit badf09b

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

apps/theming/css/default.css

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
--color-box-shadow: rgba(var(--color-box-shadow-rgb), 0.5);
3333
--color-border: #ededed;
3434
--color-border-dark: #dbdbdb;
35+
--color-border-maxcontrast: #949494;
3536
--font-face: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, Ubuntu, 'Helvetica Neue', Arial, sans-serif, 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
3637
--default-font-size: 15px;
3738
--animation-quick: 100ms;
@@ -55,21 +56,21 @@
5556
--background-invert-if-bright: invert(100%);
5657
--background-image-invert-if-bright: no;
5758
--primary-invert-if-bright: no;
58-
--color-primary: #00639a;
59+
--color-primary: #006aa3;
5960
--color-primary-default: #0082c9;
6061
--color-primary-text: #ffffff;
61-
--color-primary-hover: #3282ae;
62-
--color-primary-light: #e5eff4;
63-
--color-primary-light-text: #00273d;
64-
--color-primary-light-hover: #dbe4e9;
62+
--color-primary-hover: #3287b5;
63+
--color-primary-light: #e5f0f5;
64+
--color-primary-light-text: #002a41;
65+
--color-primary-light-hover: #dbe5ea;
6566
--color-primary-text-dark: #ededed;
66-
--color-primary-element: #00639a;
67+
--color-primary-element: #006aa3;
6768
--color-primary-element-default-hover: #329bd3;
6869
--color-primary-element-text: #ffffff;
69-
--color-primary-element-hover: #3282ae;
70-
--color-primary-element-light: #e5eff4;
71-
--color-primary-element-light-text: #00273d;
72-
--color-primary-element-light-hover: #dbe4e9;
70+
--color-primary-element-hover: #3287b5;
71+
--color-primary-element-light: #e5f0f5;
72+
--color-primary-element-light-text: #002a41;
73+
--color-primary-element-light-hover: #dbe5ea;
7374
--color-primary-element-text-dark: #ededed;
7475
--gradient-primary-background: linear-gradient(40deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
7576
--image-background-default: url('/apps/theming/img/background/kamil-porembinski-clouds.jpg');

apps/theming/lib/Service/BackgroundService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class BackgroundService {
4646
// true when the background is bright and need dark icons
4747
public const THEMING_MODE_DARK = 'dark';
4848
public const DEFAULT_COLOR = '#0082c9';
49-
public const DEFAULT_ACCESSIBLE_COLOR = '#00639a';
49+
public const DEFAULT_ACCESSIBLE_COLOR = '#006aa3';
5050

5151
public const BACKGROUND_SHIPPED = 'shipped';
5252
public const BACKGROUND_CUSTOM = 'custom';

apps/theming/lib/Themes/DarkTheme.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ public function getCSSVariables(): array {
9191

9292
'--color-border' => $this->util->lighten($colorMainBackground, 7),
9393
'--color-border-dark' => $this->util->lighten($colorMainBackground, 14),
94+
'--color-border-maxcontrast' => $this->util->lighten($colorMainBackground, 30),
9495

9596
'--background-invert-if-dark' => 'invert(100%)',
9697
'--background-invert-if-bright' => 'no',

apps/theming/lib/Themes/DefaultTheme.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ public function getCSSVariables(): array {
157157

158158
'--color-border' => $this->util->darken($colorMainBackground, 7),
159159
'--color-border-dark' => $this->util->darken($colorMainBackground, 14),
160+
'--color-border-maxcontrast' => $this->util->darken($colorMainBackground, 42),
160161

161162
'--font-face' => "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, Ubuntu, 'Helvetica Neue', Arial, sans-serif, 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
162163
'--default-font-size' => '15px',

0 commit comments

Comments
 (0)