Skip to content

Commit 5922fdd

Browse files
authored
Merge pull request #35640 from nextcloud/backport/35549/stable25
[stable25] Add new border color variable and adjust primary color for increased contrast
2 parents 5843064 + bf0af98 commit 5922fdd

File tree

5 files changed

+18
-15
lines changed

5 files changed

+18
-15
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;
@@ -58,21 +59,21 @@
5859
--image-background-default: url('/core/img/app-background.jpg');
5960
--color-background-plain: #0082c9;
6061
--primary-invert-if-bright: no;
61-
--color-primary: #00639a;
62+
--color-primary: #006aa3;
6263
--color-primary-default: #0082c9;
6364
--color-primary-text: #ffffff;
64-
--color-primary-hover: #3282ae;
65-
--color-primary-light: #e5eff4;
66-
--color-primary-light-text: #00273d;
67-
--color-primary-light-hover: #dbe4e9;
65+
--color-primary-hover: #3287b5;
66+
--color-primary-light: #e5f0f5;
67+
--color-primary-light-text: #002a41;
68+
--color-primary-light-hover: #dbe5ea;
6869
--color-primary-text-dark: #ededed;
69-
--color-primary-element: #00639a;
70+
--color-primary-element: #006aa3;
7071
--color-primary-element-default-hover: #329bd3;
7172
--color-primary-element-text: #ffffff;
72-
--color-primary-element-hover: #3282ae;
73-
--color-primary-element-light: #e5eff4;
74-
--color-primary-element-light-text: #00273d;
75-
--color-primary-element-light-hover: #dbe4e9;
73+
--color-primary-element-hover: #3287b5;
74+
--color-primary-element-light: #e5f0f5;
75+
--color-primary-element-light-text: #002a41;
76+
--color-primary-element-light-hover: #dbe5ea;
7677
--color-primary-element-text-dark: #ededed;
7778
--gradient-primary-background: linear-gradient(40deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
7879
}

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 SHIPPED_BACKGROUNDS = [
5252
'anatoly-mikhaltsov-butterfly-wing-scale.jpg' => [

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',

tests/acceptance/features/app-theming.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ Feature: app-theming
99
# The "eventually" part is not really needed here, as the colour is not
1010
# being animated at this point, but there is no need to create a specific
1111
# step just for this.
12-
And I see that the primary color is eventually "#00639a"
12+
And I see that the primary color is eventually "#006aa3"
1313
And I see that the non-plain background color variable is eventually "#0082c9"
1414
When I set the "Color" parameter in the Theming app to "#C9C9C9"
1515
Then I see that the parameters in the Theming app are eventually saved
16-
And I see that the primary color is eventually "#00639a"
16+
And I see that the primary color is eventually "#006aa3"
1717
And I see that the non-plain background color variable is eventually "#C9C9C9"
1818

1919
Scenario: resetting the color updates the primary color
@@ -23,9 +23,9 @@ Feature: app-theming
2323
And I see that the color selector in the Theming app has loaded
2424
And I set the "Color" parameter in the Theming app to "#C9C9C9"
2525
And I see that the parameters in the Theming app are eventually saved
26-
And I see that the primary color is eventually "#00639a"
26+
And I see that the primary color is eventually "#006aa3"
2727
And I see that the non-plain background color variable is eventually "#C9C9C9"
2828
When I reset the "Color" parameter in the Theming app to its default value
2929
Then I see that the parameters in the Theming app are eventually saved
30-
And I see that the primary color is eventually "#00639a"
30+
And I see that the primary color is eventually "#006aa3"
3131
And I see that the non-plain background color variable is eventually "#0082c9"

0 commit comments

Comments
 (0)