From 9226e8bdca02272493836d89dfb2ac224f827b35 Mon Sep 17 00:00:00 2001 From: Karl Stolley Date: Thu, 2 Nov 2023 14:17:42 -0500 Subject: [PATCH] left_sidebar: Use grid or flexbox to order selected home view. --- web/styles/left_sidebar.css | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/web/styles/left_sidebar.css b/web/styles/left_sidebar.css index 66a7e5bcef..686ef38e6c 100644 --- a/web/styles/left_sidebar.css +++ b/web/styles/left_sidebar.css @@ -585,6 +585,11 @@ li.active-sub-filter { #left-sidebar-navigation-list { margin-bottom: $sections_vertical_gutter; + /* We display this as a grid only to control + the order of home views, using a single + named grid area. */ + display: grid; + grid-template-areas: "selected-home-view"; .left-sidebar-navigation-label-container { .left-sidebar-navigation-label { @@ -595,6 +600,19 @@ li.active-sub-filter { } } +.selected-home-view { + /* This bumps the selected view to the + top of the grid (expanded list). + Others items will auto place in the + remaining auto-generated grid rows. */ + grid-area: selected-home-view; + /* The condensed view is a flexbox, so + here we'll use a negative order to + bump the selected home view to the + start of the flexbox (lefthand side). */ + order: -1; +} + .top_left_starred_messages .unread_count, .top_left_drafts .unread_count, .top_left_scheduled_messages .unread_count,