Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weimann <mail@michael-weimann.eu>2018-08-28 19:21:17 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2018-10-02 09:37:55 +0300
commitc7e81e17c86a6e6beff433238a6923f5d931c22f (patch)
treee36ff2cb0a2875dabb0e5ed1dc4e4fc331cdf905 /apps/theming/css
parentd855c38e078f2cd0bec86d5a20fc2f448799433b (diff)
Updates inverted logo handling to work like the app icons
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
Diffstat (limited to 'apps/theming/css')
-rw-r--r--apps/theming/css/theming.scss26
1 files changed, 23 insertions, 3 deletions
diff --git a/apps/theming/css/theming.scss b/apps/theming/css/theming.scss
index b1b8896d0c1..35341159f19 100644
--- a/apps/theming/css/theming.scss
+++ b/apps/theming/css/theming.scss
@@ -7,6 +7,17 @@
@return (0.2126 * $-local-red + 0.7152 * $-local-green + 0.0722 * $-local-blue) / 255;
}
+$has-custom-logo: variable_exists('theming-logo-mime') and $theming-logo-mime != '';
+$invert: luma($color-primary) > 0.6;
+
+@if ($has-custom-logo == false) {
+ @if ($invert) {
+ $image-logo: url('../../../../svg/core/logo/logo/000000?v=1');
+ } @else {
+ $image-logo: url('../../../../svg/core/logo/logo/ffffff?v=1');
+ }
+}
+
.nc-theming-main-background {
background-color: $color-primary;
}
@@ -19,7 +30,7 @@
color: $color-primary-text;
}
-@if (luma($color-primary) > 0.6) {
+@if ($invert) {
#appmenu:not(.inverted) svg {
filter: invert(1);
}
@@ -104,7 +115,8 @@
}
/* override styles for login screen in guest.css */
-@if variable_exists('theming-logo-mime') and $theming-logo-mime != '' {
+@if ($has-custom-logo) {
+ // custom logo
#theming-preview-logo,
#header .logo {
background-size: contain;
@@ -113,6 +125,14 @@
#body-login #header .logo {
margin-bottom: 22px;
}
+} @else {
+ // default logo
+ @if ($invert) {
+ #theming-preview-logo,
+ #header .logo {
+ opacity: .6;
+ }
+ }
}
@if variable_exists('theming-background-mime') and $theming-background-mime != '' {
@@ -157,7 +177,7 @@ input.primary,
color: $color-primary-text;
}
-@if (luma($color-primary) > 0.6) {
+@if ($invert) {
#body-login #submit-wrapper .icon-confirm-white {
background-image: url('../../../core/img/actions/confirm.svg');
}