mirror of
https://github.com/discourse/discourse.git
synced 2026-08-11 02:59:07 +08:00
We overlooked the consequence of removing the chat icon in the header in #35015 so this commit brings it back, in a different way. On mobile only, the back button will save space to display the unread indicator, if needed: <img width="732" height="1568" alt="CleanShot 2025-11-11 at 15 53 50@2x" src="https://github.com/user-attachments/assets/6ddff73b-3f5c-493b-ad44-ec130c8be491" /> As a consequence, there will be extra white-space between back-button and channel title: this is intentional, unavoidable (alternative is layout shift), and in line with dominating message apps. This commit also consolidates the unread indicator styling a bit more.
34 lines
709 B
SCSS
Vendored
34 lines
709 B
SCSS
Vendored
@mixin chat-unread-indicator {
|
|
@include unselectable;
|
|
width: 0.5rem;
|
|
height: 0.5rem;
|
|
border-radius: 1em;
|
|
box-sizing: content-box;
|
|
-webkit-touch-callout: none;
|
|
background: var(--tertiary-med-or-tertiary);
|
|
color: var(--secondary);
|
|
font-size: var(--font-down-2);
|
|
text-align: center;
|
|
transition: border-color linear 0.15s;
|
|
|
|
@content;
|
|
|
|
&.-urgent {
|
|
background: var(--success);
|
|
color: var(--secondary);
|
|
height: 1em;
|
|
width: min-content;
|
|
min-width: 0.6em;
|
|
padding: 0.21em 0.42em;
|
|
}
|
|
|
|
&__number {
|
|
color: var(--secondary);
|
|
line-height: var(--line-height-small);
|
|
}
|
|
}
|
|
|
|
.c-unread-indicator,
|
|
.chat-channel-unread-indicator {
|
|
@include chat-unread-indicator;
|
|
}
|