diff options
author | Michael Weimann <mail@michael-weimann.eu> | 2018-08-28 18:21:17 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-10-02 08:37:55 +0200 |
commit | c7e81e17c86a6e6beff433238a6923f5d931c22f (patch) | |
tree | e36ff2cb0a2875dabb0e5ed1dc4e4fc331cdf905 /apps/theming/css | |
parent | d855c38e078f2cd0bec86d5a20fc2f448799433b (diff) | |
download | nextcloud-server-c7e81e17c86a6e6beff433238a6923f5d931c22f.tar.gz nextcloud-server-c7e81e17c86a6e6beff433238a6923f5d931c22f.zip |
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.scss | 26 |
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'); } |