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