left_sidebar: Add offset to unreads to make New topic appear centered.

This commit is contained in:
Karl Stolley 2024-10-08 16:24:25 -04:00 committed by Tim Abbott
parent 484d5d05d6
commit 1fae8931c3
2 changed files with 40 additions and 0 deletions

View File

@ -236,6 +236,8 @@
/* This represents the space in the sidebar reserved for symbols like
the #; labels like the stream name go to the right of this. */
--left-sidebar-icon-column-width: 16px;
/* Offset on unreads to make New topic button appear centered. */
--left-sidebar-unread-offset: 6.5px;
/* space direct message / stream / topic names from unread counters
and @ mention indicators by 3px on the right */
--left-sidebar-before-unread-count-padding: 3px;

View File

@ -228,6 +228,12 @@
display: flex;
gap: 5px;
align-items: center;
/* Extra margin for unreads. */
margin-right: var(--left-sidebar-unread-offset);
&:has(.unread_count:empty) {
margin-right: 0;
}
}
#show-all-direct-messages {
@ -764,6 +770,12 @@ li.top_left_scheduled_messages {
.unread_count {
grid-area: markers-and-unreads;
/* Extra margin for unreads. */
margin-right: var(--left-sidebar-unread-offset);
&:empty {
margin-right: 0;
}
}
}
@ -772,6 +784,8 @@ li.top_left_scheduled_messages {
.masked_unread_count {
display: flex;
grid-area: markers-and-unreads;
/* Extra margin for unreads. */
margin-right: var(--left-sidebar-unread-offset);
}
.unread_count {
@ -1185,6 +1199,12 @@ li.top_left_scheduled_messages {
gap: 5px;
align-items: center;
justify-content: center;
/* Extra margin for unreads. */
margin-right: var(--left-sidebar-unread-offset);
&:has(.unread_count:empty) {
margin-right: 0;
}
.unread_mention_info {
/* Unset margin in favor of flex gap. */
@ -1437,6 +1457,12 @@ li.topic-list-item {
16px-high unread box. */
display: flex;
align-items: center;
/* Extra margin for unreads. */
margin-right: var(--left-sidebar-unread-offset);
&:empty {
margin-right: 0;
}
}
}
@ -1494,6 +1520,12 @@ li.topic-list-item {
.unread_count {
grid-area: markers-and-unreads;
/* Extra margin for unreads. */
margin-right: var(--left-sidebar-unread-offset);
&:empty {
margin-right: 0;
}
}
}
@ -1551,6 +1583,12 @@ li.topic-list-item {
display: flex;
align-items: center;
grid-gap: 5px;
/* Extra margin for unreads. */
margin-right: var(--left-sidebar-unread-offset);
&:has(.unread_count:empty) {
margin-right: 0;
}
}
#filter_streams_tooltip {