2022-05-05 17:13:09 +08:00
|
|
|
/*
|
|
|
|
Copyright 2021 Šimon Brandner <simon.bra.ag@gmail.com>
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
.mx_Pill {
|
2022-05-10 13:00:35 +08:00
|
|
|
padding: $font-1px 0.4em $font-1px 0.4em;
|
2022-05-05 17:13:09 +08:00
|
|
|
line-height: $font-17px;
|
|
|
|
border-radius: $font-16px;
|
|
|
|
vertical-align: text-top;
|
|
|
|
display: inline-flex;
|
|
|
|
align-items: center;
|
2022-06-19 17:56:37 +08:00
|
|
|
box-sizing: border-box;
|
|
|
|
max-width: 100%;
|
|
|
|
overflow: hidden;
|
2022-05-05 17:13:09 +08:00
|
|
|
cursor: pointer;
|
|
|
|
|
2022-07-27 21:39:29 +08:00
|
|
|
color: $accent-fg-color !important; /* To override .markdown-body */
|
|
|
|
background-color: $pill-bg-color !important; /* To override .markdown-body */
|
2022-05-05 17:13:09 +08:00
|
|
|
|
2023-03-21 17:23:20 +08:00
|
|
|
> * {
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
|
2022-05-05 17:13:09 +08:00
|
|
|
&.mx_UserPill_me,
|
|
|
|
&.mx_AtRoomPill {
|
2022-07-27 21:39:29 +08:00
|
|
|
background-color: $alert !important; /* To override .markdown-body */
|
2022-05-05 17:13:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
2022-07-27 21:39:29 +08:00
|
|
|
background-color: $pill-hover-bg-color !important; /* To override .markdown-body */
|
2022-05-05 17:13:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&.mx_UserPill_me:hover {
|
2022-07-27 21:39:29 +08:00
|
|
|
background-color: #ff6b75 !important; /* To override .markdown-body | same on both themes */
|
2022-05-05 17:13:09 +08:00
|
|
|
}
|
|
|
|
|
2022-07-27 21:39:29 +08:00
|
|
|
/* We don't want to indicate clickability */
|
2022-05-05 17:13:09 +08:00
|
|
|
&.mx_AtRoomPill:hover {
|
2022-07-27 21:39:29 +08:00
|
|
|
background-color: $alert !important; /* To override .markdown-body */
|
2022-05-05 17:13:09 +08:00
|
|
|
cursor: unset;
|
|
|
|
}
|
|
|
|
|
2022-05-11 02:24:29 +08:00
|
|
|
&::before,
|
2022-05-05 17:13:09 +08:00
|
|
|
.mx_BaseAvatar {
|
2022-07-27 21:39:29 +08:00
|
|
|
margin-inline-start: -0.3em; /* Otherwise the gap is too large */
|
2022-06-05 21:22:44 +08:00
|
|
|
margin-inline-end: 0.2em;
|
2022-07-27 21:39:29 +08:00
|
|
|
min-width: $font-16px; /* ensure the avatar is not compressed */
|
2022-06-19 17:56:37 +08:00
|
|
|
}
|
|
|
|
|
2023-03-21 17:23:20 +08:00
|
|
|
.mx_Pill_text {
|
|
|
|
min-width: 0;
|
2022-06-19 17:56:37 +08:00
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
2023-03-21 17:23:20 +08:00
|
|
|
white-space: nowrap;
|
2022-05-05 17:13:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
a& {
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
2022-07-27 21:39:29 +08:00
|
|
|
text-decoration: none !important; /* To override .markdown-body */
|
2022-05-05 17:13:09 +08:00
|
|
|
}
|
2023-03-21 17:23:20 +08:00
|
|
|
|
|
|
|
.mx_Pill_LinkIcon {
|
|
|
|
background-color: $link-external;
|
|
|
|
box-sizing: border-box;
|
|
|
|
color: $background;
|
|
|
|
height: 16px;
|
|
|
|
padding: 1px;
|
|
|
|
width: 16px;
|
2023-08-29 15:57:23 +08:00
|
|
|
border-radius: 50%;
|
2023-03-21 17:23:20 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_Pill_UserIcon {
|
|
|
|
box-sizing: border-box;
|
|
|
|
color: $secondary-content;
|
|
|
|
height: 16px;
|
|
|
|
width: 16px;
|
|
|
|
}
|
2022-05-05 17:13:09 +08:00
|
|
|
}
|