2020-06-09 03:42:18 +08:00
|
|
|
/*
|
2024-09-09 21:57:16 +08:00
|
|
|
Copyright 2024 New Vector Ltd.
|
2020-06-09 03:42:18 +08:00
|
|
|
Copyright 2020 The Matrix.org Foundation C.I.C.
|
|
|
|
|
2024-09-09 21:57:16 +08: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-09 03:42:18 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
.mx_NotificationBadge {
|
|
|
|
&:not(.mx_NotificationBadge_visible) {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2022-07-27 21:39:29 +08: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-09 03:42:18 +08:00
|
|
|
|
|
|
|
&.mx_NotificationBadge_visible {
|
2020-07-18 06:18:15 +08:00
|
|
|
background-color: $roomtile-default-badge-bg-color;
|
2020-06-09 03:42:18 +08:00
|
|
|
|
2022-07-27 21:39:29 +08:00
|
|
|
/* Create a flexbox to order the count a bit easier */
|
2020-06-09 03:42:18 +08:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
|
2022-07-27 21:39:29 +08:00
|
|
|
/* These are the 3 background types */
|
2020-06-09 03:42:18 +08:00
|
|
|
|
|
|
|
&.mx_NotificationBadge_dot {
|
2024-01-23 22:39:50 +08:00
|
|
|
width: 8px;
|
|
|
|
height: 8px;
|
|
|
|
border-radius: 8px;
|
2024-03-18 23:47:55 +08:00
|
|
|
background-color: var(--cpd-color-icon-primary);
|
2020-07-16 21:37:41 +08:00
|
|
|
|
2024-01-23 22:39:50 +08:00
|
|
|
.mx_NotificationBadge_count {
|
|
|
|
display: none;
|
|
|
|
}
|
2024-01-26 00:53:41 +08: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-09 03:42:18 +08:00
|
|
|
}
|
|
|
|
|
2023-09-19 19:24:35 +08:00
|
|
|
&.mx_NotificationBadge_knocked {
|
|
|
|
mask-image: url("$(res)/img/element-icons/ask-to-join.svg");
|
|
|
|
width: 12px;
|
|
|
|
height: 16px;
|
|
|
|
}
|
|
|
|
|
2020-06-09 03:42:18 +08:00
|
|
|
&.mx_NotificationBadge_2char {
|
2020-07-13 23:11:21 +08:00
|
|
|
width: $font-16px;
|
|
|
|
height: $font-16px;
|
|
|
|
border-radius: $font-16px;
|
2020-06-09 03:42:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&.mx_NotificationBadge_3char {
|
2020-07-13 23:11:21 +08:00
|
|
|
width: $font-26px;
|
|
|
|
height: $font-16px;
|
|
|
|
border-radius: $font-16px;
|
2020-06-09 03:42:18 +08:00
|
|
|
}
|
|
|
|
|
2022-07-27 21:39:29 +08:00
|
|
|
/* The following is the floating badge */
|
2020-06-09 03:42:18 +08:00
|
|
|
|
|
|
|
.mx_NotificationBadge_count {
|
|
|
|
font-size: $font-10px;
|
|
|
|
line-height: $font-14px;
|
2024-03-18 23:47:55 +08:00
|
|
|
font-weight: var(--cpd-font-weight-semibold);
|
|
|
|
color: var(--cpd-color-text-on-solid-primary);
|
2020-06-09 03:42:18 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|