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