From 6675933c031eeb413d5570055a9c50a9433c8143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 29 Jun 2018 21:17:05 +0200 Subject: [PATCH 1/2] Add icon without red dot for red theming colors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- css/styles.scss | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/css/styles.scss b/css/styles.scss index dc5e7b629..3bb3c52ed 100644 --- a/css/styles.scss +++ b/css/styles.scss @@ -19,6 +19,29 @@ &:focus { opacity: 1 !important; } + + @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; + } + + @if (hue($color-primary) < 15deg or hue($color-primary) > 330deg) + and (saturation($color-primary) > 70%) + and (lightness($color-primary) > 25% and lightness($color-primary) < 80%) + and (luma($color-primary) > 0.1 and luma($color-primary) < 0.6) { + .notifications-button.hasNotifications { + background-repeat: no-repeat; + background-position: center center; + background-image: url('../img/notifications-new-fallback.svg?v=1'); + img { + display: none; + } + } + } + } .notification-container { From d7d494d7c3e5138a60598e06316ca878196112d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 3 Jul 2018 16:02:16 +0200 Subject: [PATCH 2/2] Add icon for new notification fallback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- img/notifications-new-fallback.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 img/notifications-new-fallback.svg diff --git a/img/notifications-new-fallback.svg b/img/notifications-new-fallback.svg new file mode 100644 index 000000000..8701d56e4 --- /dev/null +++ b/img/notifications-new-fallback.svg @@ -0,0 +1 @@ +