Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

138 lines
3.6 KiB
Plaintext
Raw Permalink Normal View History

2019-10-13 15:08:50 +03:00
/*
2024-09-09 14:57:16 +01:00
Copyright 2024 New Vector Ltd.
2020-04-10 16:27:39 +03:00
Copyright 2020 Tulir Asokan <tulir@maunium.net>
2019-10-13 15:08:50 +03:00
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
2024-09-09 14:57:16 +01:00
Please see LICENSE files in the repository root for full details.
2019-10-13 15:08:50 +03:00
*/
.mx_ReplyTile {
position: relative;
2021-07-16 19:26:04 +02:00
padding: 2px 0;
2023-06-29 11:30:25 +01:00
font: var(--cpd-font-body-md-regular);
2021-07-14 10:14:44 +02:00
2021-07-16 19:26:04 +02:00
> a {
display: grid;
grid-template:
"sender" auto
"message" auto
/ 100%;
2021-07-16 19:26:04 +02:00
text-decoration: none;
2022-11-29 08:49:43 +01:00
color: $secondary-content;
transition: color ease 0.15s;
gap: 2px;
2026-07-15 09:15:58 +00:00
max-width: 100%; /* avoid overflow with wide content */
2022-11-29 08:49:43 +01:00
&:hover {
color: $primary-content;
}
}
.mx_RedactedBody {
line-height: $font-18px;
2019-10-13 15:08:50 +03:00
}
2021-07-15 15:38:07 +02:00
.mx_RedactedBody,
.mx_HiddenBody {
2021-07-16 19:26:04 +02:00
padding: 4px 0 2px 20px;
&::before {
height: 13px;
width: 13px;
2022-11-29 08:49:43 +01:00
top: 3px;
2021-07-16 19:26:04 +02:00
}
2021-07-15 15:38:07 +02:00
}
/* We do reply size limiting with CSS to avoid duplicating the TextualBody component. */
2021-07-16 19:26:04 +02:00
.mx_EventTile_content {
grid-area: message;
2021-07-16 19:26:04 +02:00
$reply-lines: 2;
2022-11-29 08:49:43 +01:00
$line-height: $font-18px;
2021-07-16 19:26:04 +02:00
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: $reply-lines;
2021-07-16 19:26:04 +02:00
.mx_EventTile_body.mx_EventTile_bigEmoji {
line-height: $font-22px !important; /* Same as var(--EventTile_group_line-line-height) */
font-size: $font-14px !important; /* Override the big emoji override */
2021-07-16 19:26:04 +02:00
}
2026-07-15 09:15:58 +00:00
/* in order to keep the message on two lines, we need to make the body inline */
.mx_EventTile_body {
display: inline;
}
2026-07-15 09:15:58 +00:00
/* The annotation wrapper is flex in normal timeline messages, but that stops
-webkit-line-clamp from trimming long edited quotes down to two lines. */
2026-05-13 12:23:56 +02:00
[data-textual-body-annotation-wrapper] {
display: contents;
}
2026-07-15 09:15:58 +00:00
/* Hide line numbers and edited indicator */
2022-11-29 08:49:43 +01:00
.mx_EventTile_lineNumbers,
[data-textual-body-edited-marker] {
2021-07-16 19:26:04 +02:00
display: none;
}
/* Hack to cut content in <pre> tags too */
2021-07-16 19:26:04 +02:00
.mx_EventTile_pre_container > pre {
overflow-x: scroll;
overflow-y: hidden;
2021-07-16 19:26:04 +02:00
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: $reply-lines;
padding: 4px;
}
.markdown-body blockquote,
.markdown-body dl,
.markdown-body ol,
.markdown-body p,
.markdown-body pre,
.markdown-body table,
.markdown-body ul {
margin-bottom: 4px;
}
}
2021-07-13 08:24:18 +02:00
2021-07-16 19:26:04 +02:00
&.mx_ReplyTile_info {
padding-top: 0;
}
&.mx_ReplyTile_inline > a {
/* Render replies to emotes inline with the sender avatar */
grid-template:
"sender message" auto
/ max-content auto;
2024-01-02 18:56:39 +00:00
gap: 4px; /* increase spacing */
}
2022-11-29 08:49:43 +01:00
.mx_ReplyTile_sender {
grid-area: sender;
2022-11-29 08:49:43 +01:00
display: flex;
align-items: center;
gap: 4px;
.mx_DisambiguatedProfile {
2023-06-29 11:30:25 +01:00
font: var(--cpd-font-body-md-regular);
2022-11-29 08:49:43 +01:00
2024-01-02 18:56:39 +00:00
display: inline-block; /* anti-zalgo, with overflow hidden */
2022-11-29 08:49:43 +01:00
padding: 0;
margin: 0;
2024-01-02 18:56:39 +00:00
/* truncate long display names */
2022-11-29 08:49:43 +01:00
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.mx_BaseAvatar {
2025-12-02 09:57:28 +00:00
/* Prevent crushing by the flexbox */
flex-shrink: 0;
2022-11-29 08:49:43 +01:00
}
}
2019-10-13 15:08:50 +03:00
}