Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
left_sidebar: Correctly align vdots across all rows.
Karl Stolley3ac0c3c40155
diff --git a/web/styles/left_sidebar.css b/web/styles/left_sidebar.cssindex efedf25bb61..f0e2f860845 100644--- a/web/styles/left_sidebar.css+++ b/web/styles/left_sidebar.css@@ -584,21 +584,6 @@ li.active-sub-filter {background-color: unset;color: inherit;border: 0.5px solid var(--color-border-unread-counter);- /* The border takes up space, so we need to- subtract 1px from the usual 2px margin-top */- margin-top: 1px !important;-}--li.top_left_all_messages,-li.top_left_mentions,-li.top_left_starred_messages,-li.top_left_drafts,-li.top_left_inbox,-li.top_left_recent_view,-li.top_left_scheduled_messages {- /* TODO: Clean this up with other vdots- positioning stuff. */- position: relative;}/* Don't show the scheduled messages item... */@@ -620,12 +605,6 @@ li.top_left_scheduled_messages {.sidebar-menu-icon {grid-area: ending-anchor-element;- justify-self: center;- /* TODO: Clean up the .sidebar-menu-icon descendant- styles up and down the left sidebar. */- position: static;- font-size: 17px;- text-align: center;}}@@ -707,7 +686,7 @@ li.top_left_scheduled_messages {#views-label-container {grid-template-columns:0 15px minmax(0, 0.5fr) minmax(0, 1fr)- 20px 20px;+ 30px 12px;/* Base height on 24px icon-target area from Vlad's design. */grid-template-rows: 24px;/* TODO: Rewrite the `--left-sidebar-collapse-widget-gutter`@@ -890,9 +869,7 @@ li.top_left_scheduled_messages {}}-.bottom_left_row .subscription_block .sidebar-menu-icon,-.bottom_left_row .topic-box .sidebar-menu-icon {- position: static;+.bottom_left_row .sidebar-menu-icon {grid-area: ending-anchor-element;}@@ -913,31 +890,23 @@ li.top_left_scheduled_messages {flex: 0 1 auto;}-.left_sidebar_menu_icon_visible {- display: block !important;-}-/*All of our left sidebar handlers use absolutepositioning. We should fix that.*/-.top_left_row .sidebar-menu-icon,-.bottom_left_row .sidebar-menu-icon {- position: absolute;+.sidebar-menu-icon {display: none;- top: 1px;- right: 0;- font-size: 1em;+ width: 100%;+ cursor: pointer;+ /* Use a flex container to handle+ icon centering within the grid area.+ :hover actually sets the `display: flex`,+ so it remains hidden otherwise. */+ justify-content: center;text-align: center;- padding: 0 6px;-- & i {- padding-right: 0.35em;- display: inline-block;- width: 13px;- font-size: 17px;- vertical-align: middle;- }+ /* Set the icon size, which will be inherited+ by .zulip-icon */+ font-size: 17px;/*If you hover directly over the ellipsis itself,@@ -956,7 +925,7 @@ li.top_left_scheduled_messages {*/@media (hover: none) {- display: block;+ display: flex;/* Show dots on touchscreens in a less distracting,lighter shade. */color: var(--color-vdots-hint);@@ -974,8 +943,12 @@ li.top_left_scheduled_messages {#stream_filters li:hover .stream-sidebar-menu-icon,.top_left_row:hover .sidebar-menu-icon,.bottom_left_row:hover .sidebar-menu-icon {- display: inline;- cursor: pointer;+ /* We push against `display: none` with+ `display: flex` because the sidebar vdots+ all expect to be displayed as flex items+ when visible. Their vertical alignment+ depends on it, too. */+ display: flex;color: var(--color-vdots-visible);/*@@ -992,12 +965,13 @@ li.top_left_scheduled_messages {font to show they're "lower" in the hierarchy,which also affects it positioning.*/-.bottom_left_row .topic-sidebar-menu-icon {- font-size: 0.9em;- /* Strip the line height back to the font size,- so that vertical positioning is handled by- grid exclusively. */- line-height: 1;+.topic-sidebar-menu-icon {+ /* 0.9em, but with a pixel value because the+ ordinary 17px vdots size is not inherited+ here, so we can't express an em-value+ directly. Pixels are easier to reason+ about with icons, anyway. */+ font-size: 15.3px;}ul.topic-list {