fix hover style for notifications #1525

remove `:has` selector
This commit is contained in:
daria 2024-11-13 14:30:50 +02:00
parent 8872927e21
commit 0072cb9324
2 changed files with 11 additions and 7 deletions

View File

@ -164,6 +164,14 @@
&:focus-visible {
outline-color: @cp_dropdown-fg;
}
&:hover {
background-color: @cp_dropdown-bg-hover;
}
}
li[role="menuitem"].cp-notification-avatar {
&:hover {
background-color: transparent;
}
.cp-avatar:hover {
background-color: @cp_dropdown-bg-hover;
}
@ -173,12 +181,6 @@
}
}
li[role="menuitem"]:not(:has(.cp-avatar)) {
&:hover {
background-color: @cp_dropdown-bg-hover;
}
}
&> span {
box-sizing: border-box;
height: 26px;

View File

@ -105,7 +105,9 @@ define([
h('p', data.content.msg.type + ' - ' +formatData(data))
])
]);
if ($(notif).find('.cp-avatar').length) {
$(notif).addClass('cp-notification-avatar');
}
if (typeof(data.content.getFormatText) === "function") {
$(notif).find('.cp-notification-content p').html(data.content.getFormatText());
if (data.content.autorefresh) {