2020-06-08 19:42:18 +00:00
|
|
|
/*
|
2024-09-09 13:57:16 +00:00
|
|
|
Copyright 2024 New Vector Ltd.
|
2020-06-08 19:42:18 +00:00
|
|
|
Copyright 2020 The Matrix.org Foundation C.I.C.
|
|
|
|
|
2024-09-09 13:57:16 +00:00
|
|
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
|
|
|
Please see LICENSE files in the repository root for full details.
|
2020-06-08 19:42:18 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
.mx_NotificationBadge {
|
|
|
|
&:not(.mx_NotificationBadge_visible) {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2022-07-27 13:39:29 +00:00
|
|
|
/* Badges are structured a bit weirdly to work around issues with non-monospace */
|
|
|
|
/* font styles. The badge pill is actually a background div and the count floats */
|
|
|
|
/* within that. For example: */
|
|
|
|
/* ( 99+ ) <-- Rounded pill is a _bg class. */
|
|
|
|
/* ^- The count is an element floating within that. */
|
2020-06-08 19:42:18 +00:00
|
|
|
|
|
|
|
&.mx_NotificationBadge_visible {
|
2020-07-17 22:18:15 +00:00
|
|
|
background-color: $roomtile-default-badge-bg-color;
|
2020-06-08 19:42:18 +00:00
|
|
|
|
2022-07-27 13:39:29 +00:00
|
|
|
/* Create a flexbox to order the count a bit easier */
|
2020-06-08 19:42:18 +00:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
|
2022-07-27 13:39:29 +00:00
|
|
|
/* These are the 3 background types */
|
2020-06-08 19:42:18 +00:00
|
|
|
|
|
|
|
&.mx_NotificationBadge_dot {
|
2024-01-23 14:39:50 +00:00
|
|
|
width: 8px;
|
|
|
|
height: 8px;
|
|
|
|
border-radius: 8px;
|
2024-03-18 15:47:55 +00:00
|
|
|
background-color: var(--cpd-color-icon-primary);
|
2020-07-16 13:37:41 +00:00
|
|
|
|
2024-01-23 14:39:50 +00:00
|
|
|
.mx_NotificationBadge_count {
|
|
|
|
display: none;
|
|
|
|
}
|
2024-01-25 16:53:41 +00:00
|
|
|
|
|
|
|
/* Redundant sounding name, but a notification badge that indicates there is a regular,
|
|
|
|
* non-highlight notification
|
|
|
|
* The green colour only applies for notification dot: badges indicating the same notification
|
|
|
|
* level are the standard grey.
|
|
|
|
*/
|
|
|
|
&.mx_NotificationBadge_level_notification {
|
|
|
|
background-color: var(--cpd-color-icon-success-primary);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Badges for highlight notifications. Style for notification level
|
|
|
|
* badges is in _EventTile.scss because it applies only to notification
|
|
|
|
* dots, not badges.
|
|
|
|
*/
|
|
|
|
&.mx_NotificationBadge_level_highlight {
|
|
|
|
background-color: var(--cpd-color-icon-critical-primary);
|
2020-06-08 19:42:18 +00:00
|
|
|
}
|
|
|
|
|
2023-09-19 11:24:35 +00:00
|
|
|
&.mx_NotificationBadge_knocked {
|
|
|
|
mask-image: url("$(res)/img/element-icons/ask-to-join.svg");
|
|
|
|
width: 12px;
|
|
|
|
height: 16px;
|
|
|
|
}
|
|
|
|
|
2020-06-08 19:42:18 +00:00
|
|
|
&.mx_NotificationBadge_2char {
|
2020-07-13 15:11:21 +00:00
|
|
|
width: $font-16px;
|
|
|
|
height: $font-16px;
|
|
|
|
border-radius: $font-16px;
|
2020-06-08 19:42:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&.mx_NotificationBadge_3char {
|
2020-07-13 15:11:21 +00:00
|
|
|
width: $font-26px;
|
|
|
|
height: $font-16px;
|
|
|
|
border-radius: $font-16px;
|
2020-06-08 19:42:18 +00:00
|
|
|
}
|
|
|
|
|
2022-07-27 13:39:29 +00:00
|
|
|
/* The following is the floating badge */
|
2020-06-08 19:42:18 +00:00
|
|
|
|
|
|
|
.mx_NotificationBadge_count {
|
|
|
|
font-size: $font-10px;
|
|
|
|
line-height: $font-14px;
|
2024-03-18 15:47:55 +00:00
|
|
|
font-weight: var(--cpd-font-weight-semibold);
|
|
|
|
color: var(--cpd-color-text-on-solid-primary);
|
2020-06-08 19:42:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|