2022-05-05 12:13:09 +03:00
|
|
|
/*
|
2024-09-09 16:57:16 +03:00
|
|
|
Copyright 2024 New Vector Ltd.
|
2022-05-05 12:13:09 +03:00
|
|
|
Copyright 2021 Šimon Brandner <simon.bra.ag@gmail.com>
|
|
|
|
|
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.
|
2022-05-05 12:13:09 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
.mx_Pill {
|
2022-05-10 08:00:35 +03:00
|
|
|
padding: $font-1px 0.4em $font-1px 0.4em;
|
2022-05-05 12:13:09 +03:00
|
|
|
line-height: $font-17px;
|
|
|
|
border-radius: $font-16px;
|
|
|
|
vertical-align: text-top;
|
|
|
|
display: inline-flex;
|
|
|
|
align-items: center;
|
2022-06-19 12:56:37 +03:00
|
|
|
box-sizing: border-box;
|
|
|
|
max-width: 100%;
|
|
|
|
overflow: hidden;
|
2022-05-05 12:13:09 +03:00
|
|
|
cursor: pointer;
|
|
|
|
|
2024-03-18 18:47:55 +03:00
|
|
|
color: var(--cpd-color-text-on-solid-primary) !important; /* To override .markdown-body */
|
2022-07-27 16:39:29 +03:00
|
|
|
background-color: $pill-bg-color !important; /* To override .markdown-body */
|
2022-05-05 12:13:09 +03:00
|
|
|
|
2023-03-21 12:23:20 +03:00
|
|
|
> * {
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
|
2022-05-05 12:13:09 +03:00
|
|
|
&.mx_UserPill_me,
|
|
|
|
&.mx_AtRoomPill {
|
2024-03-18 18:47:55 +03:00
|
|
|
background-color: var(--cpd-color-bg-critical-primary) !important; /* To override .markdown-body */
|
2022-05-05 12:13:09 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
2022-07-27 16:39:29 +03:00
|
|
|
background-color: $pill-hover-bg-color !important; /* To override .markdown-body */
|
2022-05-05 12:13:09 +03:00
|
|
|
}
|
|
|
|
|
2024-03-22 03:27:13 +03:00
|
|
|
&:active {
|
|
|
|
background-color: $pill-press-bg-color !important; /* To override .markdown-body */
|
|
|
|
}
|
|
|
|
|
2022-05-05 12:13:09 +03:00
|
|
|
&.mx_UserPill_me:hover {
|
2024-03-18 18:47:55 +03:00
|
|
|
background-color: var(
|
|
|
|
--cpd-color-bg-critical-hovered
|
|
|
|
) !important; /* To override .markdown-body | same on both themes */
|
2022-05-05 12:13:09 +03:00
|
|
|
}
|
|
|
|
|
2022-07-27 16:39:29 +03:00
|
|
|
/* We don't want to indicate clickability */
|
2022-05-05 12:13:09 +03:00
|
|
|
&.mx_AtRoomPill:hover {
|
2024-03-18 18:47:55 +03:00
|
|
|
background-color: var(--cpd-color-bg-critical-primary) !important; /* To override .markdown-body */
|
2022-05-05 12:13:09 +03:00
|
|
|
cursor: unset;
|
|
|
|
}
|
|
|
|
|
2022-05-10 21:24:29 +03:00
|
|
|
&::before,
|
2022-05-05 12:13:09 +03:00
|
|
|
.mx_BaseAvatar {
|
2022-07-27 16:39:29 +03:00
|
|
|
margin-inline-start: -0.3em; /* Otherwise the gap is too large */
|
2022-06-05 16:22:44 +03:00
|
|
|
margin-inline-end: 0.2em;
|
2022-07-27 16:39:29 +03:00
|
|
|
min-width: $font-16px; /* ensure the avatar is not compressed */
|
2022-06-19 12:56:37 +03:00
|
|
|
}
|
|
|
|
|
2023-03-21 12:23:20 +03:00
|
|
|
.mx_Pill_text {
|
|
|
|
min-width: 0;
|
2022-06-19 12:56:37 +03:00
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
2023-03-21 12:23:20 +03:00
|
|
|
white-space: nowrap;
|
2022-05-05 12:13:09 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
a& {
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
2022-07-27 16:39:29 +03:00
|
|
|
text-decoration: none !important; /* To override .markdown-body */
|
2022-05-05 12:13:09 +03:00
|
|
|
}
|
2023-03-21 12:23:20 +03:00
|
|
|
|
|
|
|
.mx_Pill_LinkIcon {
|
|
|
|
background-color: $link-external;
|
|
|
|
box-sizing: border-box;
|
|
|
|
color: $background;
|
|
|
|
height: 16px;
|
|
|
|
padding: 1px;
|
|
|
|
width: 16px;
|
2023-08-29 10:57:23 +03:00
|
|
|
border-radius: 50%;
|
2023-03-21 12:23:20 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_Pill_UserIcon {
|
|
|
|
box-sizing: border-box;
|
|
|
|
color: $secondary-content;
|
|
|
|
height: 16px;
|
|
|
|
width: 16px;
|
|
|
|
}
|
2023-09-21 14:04:57 +03:00
|
|
|
|
|
|
|
&.mx_SpacePill {
|
|
|
|
border-top-left-radius: 8px;
|
|
|
|
border-bottom-left-radius: 8px;
|
|
|
|
padding-left: 4px;
|
|
|
|
}
|
2022-05-05 12:13:09 +03:00
|
|
|
}
|