From 21faad66c9642b4484ebd2a11f5d6176eae6f191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sun, 9 Oct 2022 23:58:36 +0200 Subject: [PATCH] Fix color changing on hover on non-link notifications IMHO it was really strange to change the color on hover when the element isn't interactive. --- app/assets/stylesheets/layout.scss | 13 ++++++++----- app/views/notifications/_notification.html.erb | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 46cde7be2..4098fc319 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -1375,16 +1375,20 @@ form { } } + .notification-link { + color: inherit; + + &:hover { + color: $link; + } + } + &:hover { a { text-decoration: none; } - p:not(.time) { - color: $link; - } - &::before { content: "\43"; } @@ -1405,7 +1409,6 @@ form { } p { - color: $text; margin-bottom: 0; max-width: 80%; } diff --git a/app/views/notifications/_notification.html.erb b/app/views/notifications/_notification.html.erb index 48ae90db0..4eae3d8c5 100644 --- a/app/views/notifications/_notification.html.erb +++ b/app/views/notifications/_notification.html.erb @@ -5,7 +5,7 @@ title: notification.notifiable_title, body: notification.notifiable_body } %> <% link_text = render "/notifications/notification_body", locals %> - <%= link_to_if notification.link.present?, link_text, notification.link %> + <%= link_to_if notification.link.present?, link_text, notification.link, class: "notification-link" %> <% else %>