summaryrefslogtreecommitdiffstats
path: root/apps/theming/css/theming.scss
diff options
context:
space:
mode:
Diffstat (limited to 'apps/theming/css/theming.scss')
-rw-r--r--apps/theming/css/theming.scss24
1 files changed, 21 insertions, 3 deletions
diff --git a/apps/theming/css/theming.scss b/apps/theming/css/theming.scss
index 4474c232d94..cabcd5a2e0e 100644
--- a/apps/theming/css/theming.scss
+++ b/apps/theming/css/theming.scss
@@ -1,3 +1,12 @@
+/** Calculate luma as it is also used in OCA\Theming\Util::calculateLuma */
+@function luma($c) {
+ $-local-red: red(rgba($c, 1.0));
+ $-local-green: green(rgba($c, 1.0));
+ $-local-blue: blue(rgba($c, 1.0));
+
+ @return (0.2126 * $-local-red + 0.7152 * $-local-green + 0.0722 * $-local-blue) / 255;
+}
+
.nc-theming-main-background {
background-color: $color-primary;
}
@@ -10,7 +19,11 @@
color: $color-primary-text;
}
-@if (lightness($color-primary) > 55) {
+@if (luma($color-primary) > 0.6) {
+ #appmenu img,
+ #appmenu image {
+ filter: invert(1);
+ }
.searchbox input[type="search"] {
background: transparent url('../../../core/img/actions/search.svg') no-repeat 6px center;
}
@@ -53,6 +66,11 @@
background-color: nc-darken($color-primary-element, 30%) !important;
}
}
+} @else {
+ #appmenu img,
+ #appmenu image {
+ filter: none;
+ }
}
/* Colorized svg images */
@@ -90,8 +108,8 @@ input.primary,
color: $color-primary-text;
}
-@if (lightness($color-primary) > 50) {
- #body-login #submit-icon.icon-confirm-white {
+@if (luma($color-primary) > 0.6) {
+ #body-login #submit-wrapper .icon-confirm-white {
background-image: url('../../../core/img/actions/confirm.svg');
}
}