mirror of
https://github.com/discourse/discourse.git
synced 2024-12-12 00:03:56 +08:00
802fb3b194
- gridified the thread message indicator, alleviating some problems with positioning and overflow participant avatars will overlap/smush on smaller size and mobile - the excerpt went from 3 > 2 lines of wrapping on smaller size, still 1 line on large size - dropped the copy of "last reply" - fixed wrong line height - moved the "x replies" over to the right near the participants, as that makes more sense - using a bubble to indicate other participants, instead of copy This PR introduces the @container query, which is experimental. Nothing will break when it's being viewed in a not-supported browser, but it will be less elegant.
93 lines
1.6 KiB
SCSS
93 lines
1.6 KiB
SCSS
.chat-message {
|
|
container-type: inline-size;
|
|
}
|
|
|
|
.chat-message-thread-indicator {
|
|
cursor: pointer;
|
|
grid-area: threadindicator;
|
|
box-sizing: border-box;
|
|
display: grid;
|
|
grid-template-columns: auto 1fr auto auto;
|
|
background-color: var(--primary-very-low);
|
|
margin: 4px 0 -2px calc(var(--message-left-width) - 0.25rem);
|
|
padding: 0.5rem;
|
|
border-radius: 8px;
|
|
color: var(--primary);
|
|
|
|
> * {
|
|
pointer-events: none;
|
|
}
|
|
|
|
&:visited,
|
|
&:hover {
|
|
color: var(--primary);
|
|
}
|
|
|
|
&:hover {
|
|
.chat-message-thread-indicator__replies-count {
|
|
text-decoration: underline;
|
|
}
|
|
}
|
|
|
|
.touch & {
|
|
&.-active {
|
|
box-shadow: var(--shadow-dropdown);
|
|
}
|
|
}
|
|
|
|
.no-touch & {
|
|
&:hover {
|
|
box-shadow: var(--shadow-dropdown);
|
|
}
|
|
}
|
|
|
|
&__last-reply-avatar {
|
|
grid-area: avatar;
|
|
margin-right: 0.5rem;
|
|
|
|
.chat-user-avatar {
|
|
width: auto !important;
|
|
}
|
|
}
|
|
|
|
&__last-reply-username {
|
|
@include ellipsis;
|
|
font-weight: bold;
|
|
color: var(--primary-very-high);
|
|
margin-right: 0.25rem;
|
|
}
|
|
|
|
&__last-reply-info {
|
|
grid-area: info;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.25rem;
|
|
}
|
|
|
|
&__last-reply-timestamp {
|
|
color: var(--primary-high);
|
|
font-size: var(--font-down-2);
|
|
}
|
|
|
|
&__last-reply-excerpt {
|
|
@include ellipsis;
|
|
grid-area: excerpt;
|
|
}
|
|
|
|
.chat-thread-participants {
|
|
grid-area: participants;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
&__replies-count {
|
|
@include ellipsis;
|
|
color: var(--tertiary);
|
|
font-size: var(--font-down-1);
|
|
text-align: right;
|
|
}
|
|
}
|