From 4c2b11375f1d4cc6eacc98d606c7757de7a5fe29 Mon Sep 17 00:00:00 2001 From: Kris Date: Fri, 7 Apr 2023 17:12:45 -0400 Subject: [PATCH] UX: update fixed styling for sidebar & chat (#18) --- desktop/desktop.scss | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/desktop/desktop.scss b/desktop/desktop.scss index 109e458..088c581 100644 --- a/desktop/desktop.scss +++ b/desktop/desktop.scss @@ -1,8 +1,8 @@ $item-height: 40px; @if $Fixed_mode == "true" { - .top-menu { - position: fixed; + .header-submenus { + position: sticky; top: 0; z-index: z("header") + 1; } @@ -14,6 +14,28 @@ $item-height: 40px; #main-outlet { padding-top: calc(1.8em + #{$item-height}); } + + // need to include the menu height in the header offset + // then update the header offset where used in core for sidebar and chat + :root { + --header-offset-with-submenu: calc( + var(--header-offset, 0px) + #{$item-height} + ); + } + + .sidebar-wrapper { + top: var(--header-offset-with-submenu); + height: calc(100vh - var(--header-offset-with-submenu, 0px)); + } + + html.has-full-page-chat body #main-outlet { + max-height: calc( + var(--chat-vh, 1vh) * + 100 - + var(--header-offset-with-submenu, 0px) - + var(--composer-height, 0px) + ); + } } .top-menu {