2022-12-09 10:13:09 +01:00
|
|
|
$avatar_column_width: 46px;
|
2023-01-23 08:18:30 +01:00
|
|
|
$distance_of_text_elements_from_message_box_top: 8.5px;
|
2023-06-14 20:40:08 +02:00
|
|
|
$distance_of_non_text_elements_from_message_box: 6px;
|
|
|
|
$message_box_margin: 3px;
|
2022-12-09 10:13:09 +01:00
|
|
|
|
|
|
|
.message_row {
|
2023-05-22 18:17:52 +02:00
|
|
|
display: grid;
|
2023-07-20 19:57:31 +02:00
|
|
|
/* Prevent the messagebox column from overflowing the 1fr
|
|
|
|
space allotted by specifying `minmax(0,1fr)`, which
|
|
|
|
sets 0 as the minimum size, not the grid default of
|
|
|
|
`auto`. */
|
|
|
|
grid-template: auto auto / 2px minmax(0, 1fr);
|
2023-07-13 22:00:36 +02:00
|
|
|
grid-template-areas:
|
|
|
|
"date_unread_marker date_row "
|
|
|
|
"message_unread_marker messagebox";
|
|
|
|
|
2023-05-22 18:17:52 +02:00
|
|
|
border-left: 1px solid var(--color-message-list-border);
|
|
|
|
border-right: 1px solid var(--color-message-list-border);
|
|
|
|
background-color: var(--color-background-stream-message-content);
|
|
|
|
|
|
|
|
&.direct_mention {
|
|
|
|
background-color: var(--color-background-direct-mention);
|
2024-03-30 20:04:12 +01:00
|
|
|
|
|
|
|
.message_embed .data-container::after {
|
|
|
|
background: linear-gradient(
|
|
|
|
0deg,
|
|
|
|
var(--color-background-direct-mention),
|
|
|
|
transparent 100%
|
|
|
|
);
|
|
|
|
}
|
2023-05-22 18:17:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
&.group_mention {
|
|
|
|
background-color: var(--color-background-group-mention);
|
2024-03-30 20:04:12 +01:00
|
|
|
|
|
|
|
.message_embed .data-container::after {
|
|
|
|
background: linear-gradient(
|
|
|
|
0deg,
|
|
|
|
var(--color-background-group-mention),
|
|
|
|
transparent 100%
|
|
|
|
);
|
|
|
|
}
|
2023-05-22 18:17:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.date_row {
|
|
|
|
grid-area: date_row;
|
|
|
|
/* We only want padding for the date rows between recipient blocks */
|
|
|
|
padding-bottom: 0;
|
|
|
|
|
|
|
|
& span {
|
|
|
|
font-size: calc(12em / 14);
|
|
|
|
font-style: normal;
|
|
|
|
font-weight: 600;
|
|
|
|
line-height: 17px; /* identical to box height, or 131% */
|
|
|
|
text-align: right;
|
|
|
|
letter-spacing: 0.04em;
|
|
|
|
color: var(--color-date);
|
2023-06-08 23:01:11 +02:00
|
|
|
/* Right padding matches time in message row and date in recipient row. */
|
|
|
|
padding: 8px 6px 8px 4px;
|
2023-05-22 18:17:52 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.unread_marker {
|
|
|
|
margin-left: var(--unread-marker-left);
|
|
|
|
opacity: 0;
|
|
|
|
transition: all 0.3s ease-out;
|
|
|
|
|
|
|
|
&.slow_fade {
|
|
|
|
transition: all 2s ease-out;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.fast_fade {
|
|
|
|
transition: all 0.3s ease-out;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.date_unread_marker {
|
|
|
|
grid-area: date_unread_marker;
|
|
|
|
|
|
|
|
.unread-marker-fill {
|
|
|
|
border-radius: 0 !important;
|
|
|
|
height: 100% !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.message_unread_marker {
|
|
|
|
grid-area: message_unread_marker;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.unread-marker-fill {
|
|
|
|
height: 100%;
|
2023-05-24 20:09:02 +02:00
|
|
|
width: 2px;
|
|
|
|
background: linear-gradient(
|
|
|
|
90deg,
|
|
|
|
var(--color-unread-marker) 30%,
|
|
|
|
hsl(217deg 64% 59% / 0%)
|
|
|
|
);
|
2023-05-22 18:17:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
&.unread .unread_marker {
|
|
|
|
transition: all 0.3s ease-out;
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
.messagebox {
|
|
|
|
grid-area: messagebox;
|
|
|
|
word-wrap: break-word;
|
|
|
|
cursor: pointer;
|
|
|
|
border: none;
|
|
|
|
/* The left padding value accounts for a 2px
|
|
|
|
unread marker, ensuring a uniform 5px of
|
|
|
|
padding on either side of the message box. */
|
|
|
|
padding: 0 5px 0 3px;
|
|
|
|
|
|
|
|
&:hover .message_controls,
|
2023-08-17 21:12:56 +02:00
|
|
|
&:hover .message_failed {
|
2023-05-22 18:17:52 +02:00
|
|
|
.empty-star:hover {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
> div {
|
|
|
|
opacity: 1;
|
|
|
|
visibility: visible;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-12-09 10:13:09 +01:00
|
|
|
.messagebox .messagebox-content {
|
|
|
|
display: grid;
|
2023-06-13 18:12:48 +02:00
|
|
|
align-items: baseline;
|
2022-12-09 10:13:09 +01:00
|
|
|
padding-left: 10px;
|
2023-07-20 19:57:31 +02:00
|
|
|
/* Prevent the message column from overflowing the 1fr
|
|
|
|
space allotted by specifying `minmax(0,1fr)`, which
|
|
|
|
sets 0 as the minimum size, not the grid default of
|
2024-03-28 23:38:18 +01:00
|
|
|
`auto`.
|
|
|
|
|
|
|
|
The calculated `--message-box-timestamp-column-width`
|
|
|
|
should match `max-content` exactly, but `max-content`
|
|
|
|
ensures the timestamp will always have enough space
|
|
|
|
in the column. */
|
2023-06-21 21:37:43 +02:00
|
|
|
grid-template:
|
2023-07-17 22:43:21 +02:00
|
|
|
var(--message-box-icon-height) repeat(3, auto) /
|
2023-07-20 19:57:31 +02:00
|
|
|
$avatar_column_width minmax(0, 1fr) calc(
|
|
|
|
3 * var(--message-box-icon-width)
|
|
|
|
)
|
2024-03-28 23:38:18 +01:00
|
|
|
8px minmax(var(--message-box-timestamp-column-width), max-content);
|
2023-06-21 21:37:43 +02:00
|
|
|
/* Named grid areas provide flexibility for positioning grid items
|
|
|
|
reliably, even if the row or column definitions of the grid change. */
|
|
|
|
grid-template-areas:
|
2023-07-10 16:45:41 +02:00
|
|
|
"edited message controls . time"
|
|
|
|
". message . . . "
|
|
|
|
". more . . . "
|
|
|
|
". reactions . . . ";
|
2022-12-09 10:13:09 +01:00
|
|
|
|
2023-09-20 17:50:48 +02:00
|
|
|
&.content_edit_mode {
|
2023-12-24 07:05:59 +01:00
|
|
|
cursor: default;
|
2023-09-20 17:50:48 +02:00
|
|
|
/* Set the controls area to 0 to give more space
|
|
|
|
to the edit/source view area. */
|
|
|
|
grid-template-columns: $avatar_column_width minmax(0, 1fr) 0 8px minmax(
|
2024-03-28 23:38:18 +01:00
|
|
|
var(--message-box-timestamp-column-width),
|
2023-09-20 17:50:48 +02:00
|
|
|
max-content
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2023-08-17 18:12:56 +02:00
|
|
|
@media (width < $sm_min), ((width >= $md_min) and (width < $mc_min)) {
|
2023-09-20 17:10:46 +02:00
|
|
|
grid-template-columns:
|
|
|
|
$avatar_column_width minmax(0, 1fr) calc(
|
|
|
|
2 * var(--message-box-icon-width)
|
|
|
|
)
|
2024-03-28 23:38:18 +01:00
|
|
|
8px minmax(
|
|
|
|
var(--message-box-timestamp-column-width),
|
|
|
|
max-content
|
|
|
|
);
|
2022-12-09 10:13:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.message_controls {
|
2023-06-21 21:37:43 +02:00
|
|
|
grid-area: controls;
|
2022-12-09 10:13:09 +01:00
|
|
|
|
2023-08-17 18:12:56 +02:00
|
|
|
@media (width < $sm_min),
|
|
|
|
((width >= $md_min) and (width < $mc_min)) {
|
2022-12-09 10:13:09 +01:00
|
|
|
/* This is intended to target the first message_controls child
|
|
|
|
when there are 3 displayed. 4 = 3 + hidden message_failed element. */
|
|
|
|
.message_control_button:nth-last-child(4) {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.message_edit_notice {
|
2023-06-21 21:37:43 +02:00
|
|
|
grid-area: edited;
|
2022-12-09 10:13:09 +01:00
|
|
|
}
|
|
|
|
|
2023-03-17 19:54:09 +01:00
|
|
|
.slow-send-spinner {
|
|
|
|
display: none;
|
|
|
|
justify-self: end;
|
|
|
|
margin-right: 10px;
|
|
|
|
text-align: end;
|
2023-06-21 21:37:43 +02:00
|
|
|
grid-area: time;
|
2023-03-17 19:54:09 +01:00
|
|
|
}
|
|
|
|
|
2022-12-09 10:13:09 +01:00
|
|
|
.message_content {
|
2023-06-21 21:37:43 +02:00
|
|
|
grid-area: message;
|
2023-05-23 04:37:50 +02:00
|
|
|
/*
|
|
|
|
Space between two single line messages in a paragraph is 10px.
|
|
|
|
There is 3px margin above and below a message. So, having a 2px
|
|
|
|
padding above and below the message will make the space between
|
|
|
|
all single paragraphs the same.
|
|
|
|
*/
|
|
|
|
padding: 2px 0;
|
2023-08-06 18:19:07 +02:00
|
|
|
color: var(--color-text-message-default);
|
|
|
|
line-height: var(--message-box-line-height);
|
|
|
|
min-height: 17px;
|
|
|
|
display: block;
|
|
|
|
position: relative;
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
&:empty {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.condensed {
|
|
|
|
max-height: 8.5em;
|
|
|
|
min-height: 0;
|
|
|
|
overflow: hidden;
|
|
|
|
mask-image: linear-gradient(
|
|
|
|
to top,
|
|
|
|
hsl(0deg 0% 100% / 0%) 0%,
|
|
|
|
hsl(0deg 0% 100%) 60px
|
|
|
|
);
|
|
|
|
mask-size: cover;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.collapsed {
|
|
|
|
padding: 0;
|
|
|
|
max-height: 0;
|
|
|
|
min-height: 0;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
2022-12-09 10:13:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.message_reactions {
|
2023-06-21 21:37:43 +02:00
|
|
|
grid-area: reactions;
|
2023-08-11 20:28:51 +02:00
|
|
|
display: flex;
|
|
|
|
/* Allow reactions to wrap in mobile viewports */
|
|
|
|
flex-wrap: wrap;
|
2023-08-11 20:51:24 +02:00
|
|
|
/* Keep reactions aligned to start (top), so that the
|
|
|
|
margin on the reaction button doesn't appear to
|
|
|
|
stretch the reactions taller. */
|
|
|
|
align-items: flex-start;
|
|
|
|
/* Control reaction spacing with a gap */
|
|
|
|
gap: 4px;
|
2022-12-09 10:13:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.message_edit {
|
2023-06-21 21:37:43 +02:00
|
|
|
grid-area: message;
|
2023-06-21 19:07:23 +02:00
|
|
|
/* Align self to start, rather than baseline, so the baseline
|
|
|
|
is preserved from the message itself--keeping the time,
|
|
|
|
edit message, and controls at the same vertical alignment. */
|
|
|
|
align-self: start;
|
|
|
|
margin-top: $distance_of_non_text_elements_from_message_box;
|
2022-12-09 10:13:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.message_length_controller {
|
2023-06-21 21:37:43 +02:00
|
|
|
grid-area: more;
|
2022-12-09 10:13:09 +01:00
|
|
|
}
|
2023-08-10 21:25:37 +02:00
|
|
|
|
2023-08-10 22:14:30 +02:00
|
|
|
.collapsed ~ .message_length_controller {
|
|
|
|
/* When content is collapsed, the length controller
|
|
|
|
should occupy the space ordinarily assigned to
|
|
|
|
the message. */
|
|
|
|
grid-area: message;
|
|
|
|
/* However, don't let the SHOW MORE button participate
|
|
|
|
in the baseline group. */
|
|
|
|
align-self: start;
|
|
|
|
|
|
|
|
.message_length_toggle {
|
|
|
|
/* Ensure that a collapsed message maintains the
|
|
|
|
same space around the toggle button as any other
|
|
|
|
message-row content. */
|
|
|
|
margin: 4px 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-10 21:25:37 +02:00
|
|
|
&.content_edit_mode .message_length_controller {
|
|
|
|
/* If entering edit mode on a collapsed message,
|
|
|
|
just hide the controller area. This preserves
|
|
|
|
the collapsed state of the message, which need
|
|
|
|
not be touched. We just need to hide the button.
|
|
|
|
This works for condensed messages, too. */
|
|
|
|
display: none;
|
|
|
|
}
|
2022-12-09 10:13:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
&.include-sender {
|
|
|
|
.messagebox .messagebox-content {
|
2023-06-21 21:37:43 +02:00
|
|
|
grid-template-areas:
|
2023-07-10 16:45:41 +02:00
|
|
|
"avatar sender controls . time"
|
|
|
|
"avatar message . . . "
|
|
|
|
". more . . . "
|
|
|
|
". reactions . . . ";
|
2022-12-09 10:13:09 +01:00
|
|
|
|
2023-06-21 19:07:23 +02:00
|
|
|
.message_edit {
|
|
|
|
/* No top margin when there's a sender row */
|
|
|
|
margin-top: 0;
|
|
|
|
}
|
|
|
|
|
2023-06-14 20:40:08 +02:00
|
|
|
&.is-me-message {
|
|
|
|
grid-template-areas:
|
2023-07-10 16:45:41 +02:00
|
|
|
"avatar sender controls . time"
|
|
|
|
"avatar sender . . . "
|
|
|
|
". more . . . "
|
|
|
|
". reactions . . . ";
|
2023-06-14 20:40:08 +02:00
|
|
|
|
2023-06-30 19:27:06 +02:00
|
|
|
.message-avatar {
|
|
|
|
/* Set the line-height to match the height of the avatar image
|
|
|
|
to center me-messages within the baseline group. */
|
|
|
|
line-height: var(--message-box-avatar-height);
|
|
|
|
align-self: baseline;
|
|
|
|
}
|
|
|
|
|
2023-06-14 20:40:08 +02:00
|
|
|
.message_sender {
|
|
|
|
/* Don't display message sender as flexbox for me-messages. */
|
|
|
|
display: block;
|
|
|
|
/* This preserves a consistent bottom spacing on the me-message
|
|
|
|
grid, which ordinarily benefits from the margin of <p>
|
|
|
|
elements in the markdown--which single-line me-messages do
|
|
|
|
not receive.
|
|
|
|
|
|
|
|
It also ensures a uniform space-relationship between the top: of the avatar and the top of the sender_name line.
|
|
|
|
|
|
|
|
However, this should all arguably be handled from the grid
|
|
|
|
container or the grid definition itself. */
|
|
|
|
margin: $message_box_margin 0;
|
|
|
|
|
|
|
|
/* Set the same line-height as on message content for
|
|
|
|
me-messages. */
|
|
|
|
line-height: var(--message-box-line-height);
|
|
|
|
|
|
|
|
/* Display message components inline, with wrapping white-space,
|
|
|
|
so the sender name and message display as a continuous line
|
|
|
|
of wrapping text. */
|
|
|
|
.sender_name {
|
|
|
|
white-space: normal;
|
|
|
|
display: inline;
|
|
|
|
}
|
2023-09-21 11:25:45 +02:00
|
|
|
|
|
|
|
.sender_name_text {
|
|
|
|
max-width: 100%;
|
|
|
|
}
|
2023-06-14 20:40:08 +02:00
|
|
|
}
|
2023-06-21 19:07:23 +02:00
|
|
|
|
|
|
|
&.content_edit_mode {
|
|
|
|
.message_sender {
|
|
|
|
/* Keep the me-message participating in the baseline */
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.message_edit {
|
|
|
|
/* Use the sender grid area for the me-message edit/view-source box */
|
|
|
|
grid-area: sender;
|
|
|
|
margin-top: $distance_of_non_text_elements_from_message_box;
|
|
|
|
}
|
|
|
|
}
|
2023-06-14 20:40:08 +02:00
|
|
|
}
|
|
|
|
|
2023-07-07 17:26:25 +02:00
|
|
|
.message-avatar {
|
2023-06-14 21:03:37 +02:00
|
|
|
grid-area: avatar;
|
|
|
|
/* The picture should not participate in the baseline group. */
|
|
|
|
align-self: start;
|
2023-06-14 20:40:08 +02:00
|
|
|
/* Because the avatar may be the tallest element in a
|
|
|
|
single-line me message, this margin preserves the
|
|
|
|
overall height of the message box. */
|
|
|
|
margin: $distance_of_non_text_elements_from_message_box 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.status-message {
|
|
|
|
font-weight: normal;
|
2023-06-14 21:03:37 +02:00
|
|
|
}
|
|
|
|
|
2022-12-09 10:13:09 +01:00
|
|
|
.message_content {
|
|
|
|
padding-top: 0;
|
2023-06-21 21:37:43 +02:00
|
|
|
grid-area: message;
|
2022-12-09 10:13:09 +01:00
|
|
|
}
|
|
|
|
|
2024-03-28 16:49:46 +01:00
|
|
|
.message-time {
|
2023-08-10 22:13:36 +02:00
|
|
|
/* Don't adjust the line-height for collapsed or
|
|
|
|
edited/source messages when there's a sender,
|
|
|
|
as the sender text is always visible. */
|
|
|
|
line-height: inherit;
|
2022-12-09 10:13:09 +01:00
|
|
|
}
|
|
|
|
|
2023-03-17 19:54:09 +01:00
|
|
|
.slow-send-spinner {
|
|
|
|
align-self: center;
|
|
|
|
position: unset;
|
|
|
|
margin-top: 1px;
|
|
|
|
}
|
|
|
|
|
2022-12-09 10:13:09 +01:00
|
|
|
.message_edit_notice {
|
2023-06-13 18:12:48 +02:00
|
|
|
/* When the edit notice is inline, as on edited me-messages,
|
|
|
|
the inline-block and accompanying vertical-align styles will
|
|
|
|
apply */
|
2023-06-14 18:38:13 +02:00
|
|
|
display: inline-block;
|
2023-06-13 18:12:48 +02:00
|
|
|
vertical-align: baseline;
|
2023-06-14 18:38:13 +02:00
|
|
|
/* A bit of margin here helps these not look associated with the name. */
|
|
|
|
margin-left: 4px;
|
2022-12-09 10:13:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.message_sender {
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
2023-06-21 21:37:43 +02:00
|
|
|
grid-area: sender;
|
2023-06-14 21:03:37 +02:00
|
|
|
display: flex;
|
|
|
|
/* Ensure flexed sender info (name, status emoji, inline EDITED)
|
|
|
|
forms a baseline group, which will participate with the
|
|
|
|
message-box grid's baseline group, too. */
|
|
|
|
align-items: baseline;
|
2022-12-09 10:13:09 +01:00
|
|
|
|
2023-06-14 20:40:08 +02:00
|
|
|
margin-top: $message_box_margin;
|
|
|
|
|
2022-12-09 10:13:09 +01:00
|
|
|
.zulip-icon.zulip-icon-bot {
|
|
|
|
align-self: center;
|
2023-07-26 17:03:34 +02:00
|
|
|
padding: 0 0 0 5px;
|
2023-04-27 20:10:56 +02:00
|
|
|
}
|
|
|
|
|
2023-07-13 21:28:44 +02:00
|
|
|
.sender_name {
|
2022-12-09 10:13:09 +01:00
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
white-space: nowrap;
|
|
|
|
/* It is important to use line-height `normal` here since user's name can
|
|
|
|
be in any language and `line-height: 1` doesn't work to accommodate text
|
|
|
|
from start and end vertically in all languages. */
|
|
|
|
line-height: normal;
|
|
|
|
outline: none;
|
2023-06-13 18:12:48 +02:00
|
|
|
align-self: baseline;
|
2023-04-27 20:03:37 +02:00
|
|
|
}
|
2022-12-09 10:13:09 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-03-17 08:40:08 +01:00
|
|
|
|
|
|
|
/* Locally echoed messages. */
|
2024-03-28 16:49:46 +01:00
|
|
|
&.locally-echoed .message-time {
|
2023-03-17 08:40:08 +01:00
|
|
|
opacity: 0;
|
2024-03-28 16:49:46 +01:00
|
|
|
/* Don't show pointer when message-time doesn't have a link. */
|
2023-04-15 14:17:58 +02:00
|
|
|
cursor: default;
|
2023-03-17 08:40:08 +01:00
|
|
|
}
|
2023-03-17 19:54:09 +01:00
|
|
|
|
|
|
|
/* Show the spinner only for messages that are still locally echoed. */
|
2023-04-15 12:01:15 +02:00
|
|
|
&.locally-echoed .slow-send-spinner {
|
2023-03-17 19:54:09 +01:00
|
|
|
display: unset !important;
|
2023-04-15 14:17:58 +02:00
|
|
|
cursor: default;
|
2023-03-17 19:54:09 +01:00
|
|
|
}
|
2023-11-14 22:07:19 +01:00
|
|
|
|
|
|
|
/* Message-editing styles */
|
|
|
|
.message-edit-buttons-and-timer {
|
|
|
|
margin-top: 5px;
|
|
|
|
display: flex;
|
|
|
|
gap: 5px;
|
2023-11-15 00:23:08 +01:00
|
|
|
/* Allow items to occupy full height.
|
|
|
|
This is especially important for
|
|
|
|
buttons that are flex items. */
|
|
|
|
align-items: stretch;
|
|
|
|
}
|
|
|
|
|
|
|
|
.message-actions-button {
|
|
|
|
box-sizing: border-box;
|
2024-01-11 19:24:43 +01:00
|
|
|
/* Display the actions buttons as
|
|
|
|
flex containers for positioning
|
|
|
|
text and spinners. */
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
2023-11-15 00:23:08 +01:00
|
|
|
height: 28px;
|
2024-01-11 19:24:43 +01:00
|
|
|
padding: 0 10px;
|
2023-11-15 00:23:08 +01:00
|
|
|
border-radius: 4px;
|
|
|
|
border: 0;
|
|
|
|
line-height: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
.message_edit_save {
|
|
|
|
/* Match Save button's basic colors to
|
|
|
|
the compose box Send button. */
|
|
|
|
color: var(--color-compose-send-button-icon-color);
|
|
|
|
background-color: var(--color-compose-send-button-background);
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background-color: var(
|
|
|
|
--color-compose-send-button-background-interactive
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
&:disabled {
|
|
|
|
/* Replicate the `.new-style` disabled values,
|
|
|
|
without any color shifts. */
|
|
|
|
cursor: not-allowed;
|
|
|
|
filter: saturate(0);
|
|
|
|
opacity: 0.5;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.message_edit_cancel,
|
|
|
|
.message_edit_close {
|
|
|
|
color: var(--color-exit-button-text);
|
|
|
|
background: var(--color-exit-button-background);
|
|
|
|
border: 1px solid var(--color-exit-button-border);
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background: var(--color-exit-button-background-interactive);
|
|
|
|
}
|
2023-11-14 22:07:19 +01:00
|
|
|
}
|
2022-12-09 10:13:09 +01:00
|
|
|
}
|
2023-05-22 18:28:52 +02:00
|
|
|
|
2024-03-28 20:55:28 +01:00
|
|
|
.message-time {
|
|
|
|
justify-self: end;
|
|
|
|
padding-right: 5px;
|
|
|
|
/* Maintain first-line baseline regardless of
|
|
|
|
what happens in the message-content area (e.g., a
|
|
|
|
collapsed message, or source/edit view). This
|
|
|
|
line-height also keeps EDITED/MOVED messages
|
|
|
|
in place, care of their baseline-group participation
|
|
|
|
within the grid.
|
|
|
|
|
|
|
|
That said, 28px is a bit of a magical number.
|
|
|
|
In theory, this should be 27px. That's the height
|
|
|
|
of a single-message row without a sender. (See the
|
|
|
|
calculations for the height of a single-line,
|
|
|
|
sender-less message row in the message box grid.)
|
|
|
|
But when shifting into collapsed or source views,
|
|
|
|
28px is necessary to maintain the vertical alignment
|
|
|
|
of the EDITED messages, hover controls, and
|
|
|
|
timestamp. It's possible that this is also due to a
|
|
|
|
a rounding error, given how --message-box-line-height
|
|
|
|
is expressed as a unitless decimal. */
|
|
|
|
line-height: 28px;
|
|
|
|
grid-area: time;
|
|
|
|
display: block;
|
|
|
|
font-size: 13px;
|
|
|
|
font-weight: 350;
|
|
|
|
text-align: end;
|
|
|
|
opacity: 0.8;
|
|
|
|
color: var(--color-text-default);
|
|
|
|
letter-spacing: 0.02em;
|
|
|
|
/* Disable blue link styling for the message timestamp link. */
|
|
|
|
&:hover {
|
|
|
|
text-decoration: none;
|
|
|
|
color: var(--color-message-action-interactive);
|
|
|
|
}
|
|
|
|
|
|
|
|
&.notvisible {
|
|
|
|
/* This happens when message failed to send. We don't want to
|
|
|
|
display time but still want it to occupy space. */
|
|
|
|
width: 45px !important;
|
|
|
|
position: unset !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-01-11 17:00:01 +01:00
|
|
|
/* Additional message-editing UI styles. */
|
|
|
|
|
|
|
|
.message_edit_content {
|
|
|
|
line-height: 18px;
|
|
|
|
resize: vertical !important;
|
|
|
|
max-height: 24em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.message_edit_countdown_timer {
|
|
|
|
text-align: right;
|
|
|
|
display: inline;
|
|
|
|
color: hsl(0deg 0% 63%);
|
|
|
|
|
|
|
|
&.expired {
|
|
|
|
color: hsl(4deg 58% 33%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.message-edit-timer {
|
|
|
|
display: none;
|
|
|
|
/* Center vertically relative to
|
|
|
|
buttons. */
|
|
|
|
align-self: center;
|
|
|
|
/* Use flexbox to position to far right of
|
|
|
|
the Save and Cancel buttons. */
|
|
|
|
margin-left: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
.message-edit-feature-group {
|
|
|
|
display: flex;
|
|
|
|
margin: 0;
|
|
|
|
align-items: baseline;
|
|
|
|
}
|
|
|
|
|
|
|
|
.message_edit_save .loader {
|
|
|
|
display: none;
|
|
|
|
height: 28px;
|
|
|
|
width: 28px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.edit-controls {
|
|
|
|
.btn-wrapper {
|
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
|
|
|
|
|
|
|
.disable-btn {
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.message_edit_spinner {
|
|
|
|
margin-right: 8px;
|
|
|
|
padding-top: 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.message_edit_spinner .loading_indicator_spinner {
|
|
|
|
width: 20px;
|
|
|
|
height: 20px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.message_edit {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Reduce some of the heavy padding from Bootstrap. */
|
|
|
|
.message_edit_form {
|
|
|
|
margin-bottom: 10px;
|
|
|
|
cursor: default;
|
|
|
|
|
|
|
|
.edit-controls {
|
|
|
|
margin-left: 0;
|
|
|
|
margin-top: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
& textarea {
|
|
|
|
width: 100%;
|
|
|
|
min-width: 206px;
|
|
|
|
box-sizing: border-box;
|
|
|
|
/* Setting resize as none hides the bottom right diagonal box
|
|
|
|
(which even has a background color of its own!). */
|
|
|
|
resize: none !important;
|
|
|
|
color: hsl(0deg 0% 33%);
|
|
|
|
background-color: hsl(0deg 0% 100%);
|
|
|
|
border-radius: 4px;
|
|
|
|
vertical-align: middle;
|
|
|
|
border: 1px solid hsl(0deg 0% 80%);
|
|
|
|
padding: 4px 6px;
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
|
|
|
box-shadow: inset 0 1px 1px hsl(0deg 0% 0% / 7.5%);
|
|
|
|
transition:
|
|
|
|
border linear 0.2s,
|
|
|
|
box-shadow linear 0.2s;
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
border-color: hsl(206.5deg 80% 62% / 80%);
|
|
|
|
outline: 0;
|
|
|
|
|
|
|
|
box-shadow:
|
|
|
|
inset 0 1px 1px hsl(0deg 0% 0% / 7.5%),
|
|
|
|
0 0 8px hsl(206.5deg 80% 62% / 60%);
|
|
|
|
}
|
|
|
|
|
|
|
|
&:read-only,
|
|
|
|
&:disabled {
|
|
|
|
cursor: not-allowed;
|
|
|
|
background-color: hsl(0deg 0% 93%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.message_edit_notice {
|
|
|
|
font-size: 10px;
|
|
|
|
opacity: 0.5;
|
|
|
|
user-select: none;
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow-x: hidden;
|
|
|
|
overflow-x: clip;
|
|
|
|
}
|
|
|
|
|
|
|
|
.fade-in-message {
|
|
|
|
animation-name: fadeInMessage;
|
|
|
|
animation-duration: 1s;
|
|
|
|
animation-iteration-count: 1;
|
|
|
|
|
|
|
|
.message_edit_notice {
|
|
|
|
animation-name: fadeInEditNotice;
|
|
|
|
animation-duration: 1s;
|
|
|
|
animation-iteration-count: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.message_edit_notice_hover:hover {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
2023-05-22 18:28:52 +02:00
|
|
|
.recipient_row {
|
|
|
|
/* See https://stackoverflow.com/questions/2717480/css-selector-for-first-element-with-class/8539107#8539107
|
|
|
|
for details on how this works */
|
|
|
|
.message_row.unread {
|
|
|
|
.date_unread_marker {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Select all but the first .message_row.unread,
|
|
|
|
and remove the properties set from the previous rule. */
|
|
|
|
.message_row.unread ~ .message_row.unread {
|
|
|
|
.date_unread_marker {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|