Skip to content

Commit 3658cdf

Browse files
authored
Merge pull request #21309 from nextcloud/backport/21198/stable18
[stable18] Only use background fade if nextcloud blue is set
2 parents dbb46a7 + 414a3ae commit 3658cdf

File tree

1 file changed

+23
-30
lines changed

1 file changed

+23
-30
lines changed

apps/theming/css/theming.scss

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,28 @@
88
}
99

1010
@mixin faded-background {
11-
background-image: linear-gradient(40deg, $color-primary 0%, lighten($color-primary, 20%) 100%);
11+
background-color: $color-primary;
12+
13+
@if ($color-primary == #0082C9) {
14+
background-image: linear-gradient(40deg, $color-primary 0%, lighten($color-primary, 20%) 100%);
15+
} @else {
16+
/** This will be overwritten by the faded-background-image mixin if needed */
17+
background-image: none;
18+
}
1219
}
1320

1421
@mixin faded-background-image {
15-
@if ($color-primary == #0082C9) or ($has-custom-background == true) {
22+
@include faded-background;
23+
background-size: contain;
24+
25+
@if ($color-primary == #0082C9) {
1626
background-image: $image-login-background, linear-gradient(40deg, $color-primary 0%, lighten($color-primary, 20%) 100%);
27+
}
1728

18-
@if($has-custom-background == true) {
19-
background-size: cover;
20-
background-repeat: no-repeat;
21-
}
22-
} @else {
23-
@include faded-background;
24-
background-size: contain;
29+
@if($has-custom-background == true) {
30+
background-size: cover;
31+
background-repeat: no-repeat;
32+
background-image: $image-login-background;
2533
}
2634
}
2735

@@ -138,6 +146,12 @@ $invert: luma($color-primary) > 0.6;
138146
@include faded-background;
139147
}
140148

149+
#body-login,
150+
#firstrunwizard .firstrunwizard-header,
151+
#theming-preview {
152+
@include faded-background-image;
153+
}
154+
141155
/* override styles for login screen in guest.css */
142156
@if ($has-custom-logo) {
143157
// custom logo
@@ -159,22 +173,6 @@ $invert: luma($color-primary) > 0.6;
159173
}
160174
}
161175

162-
@if variable_exists('theming-background-mime') and $theming-background-mime != '' {
163-
#body-login,
164-
#firstrunwizard .firstrunwizard-header,
165-
#theming-preview {
166-
background-image: $image-login-background;
167-
background-color: $color-primary;
168-
@include faded-background-image;
169-
}
170-
} @else {
171-
#theming-preview {
172-
background-image: $image-login-background;
173-
background-color: $color-primary;
174-
@include faded-background-image;
175-
}
176-
}
177-
178176
@if variable_exists('theming-logoheader-mime') and $theming-logoheader-mime != '' {
179177
#theming .advanced-option-logoheader .image-preview,
180178
body:not(#body-login) #header .logo {
@@ -231,7 +229,6 @@ input.primary,
231229
@if $image-login-plain == 'true' {
232230
#body-login, #firstrunwizard .firstrunwizard-header, #theming-preview {
233231
background-image: none !important;
234-
background-color: $color-primary;
235232
}
236233
#body-login {
237234

@@ -240,10 +237,6 @@ input.primary,
240237
}
241238

242239
}
243-
} @else {
244-
#body-login {
245-
@include faded-background-image;
246-
}
247240
}
248241

249242
/** Handle primary buttons for bright colors */

0 commit comments

Comments
 (0)