From 0210d9454124b0d1dcce17d9c69b98d77fe49a54 Mon Sep 17 00:00:00 2001 From: MauserBitfly <125363940+MauserBitfly@users.noreply.github.com> Date: Fri, 14 Jun 2024 08:58:02 +0200 Subject: [PATCH] min height for nav bar 2 on desktop (#479) --- frontend/assets/css/prime_megamenu.scss | 3 +-- frontend/assets/css/variables.scss | 2 +- frontend/components/bc/header/MainHeader.vue | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/frontend/assets/css/prime_megamenu.scss b/frontend/assets/css/prime_megamenu.scss index 57cec2dcd..d6d16dd3c 100644 --- a/frontend/assets/css/prime_megamenu.scss +++ b/frontend/assets/css/prime_megamenu.scss @@ -1,5 +1,4 @@ .p-megamenu { - padding: 8px 0 8px 8px; background: var(--container-background); user-select: none; z-index: 1; // without this, the menu keeps a very high z-index when it is open in mobile mode and then the window is enlarged (the change of mode closes the menu but does not reset its z-index, so the menu bar floats above the search bar) @@ -37,7 +36,7 @@ min-width: fit-content; right: 0; left: auto; - top: var(--navbar2-height); + top: calc(var(--navbar2-height) - 7px); border-radius: var(--border-radius); } .p-submenu-header { diff --git a/frontend/assets/css/variables.scss b/frontend/assets/css/variables.scss index 0d91b5288..60dbe6f92 100644 --- a/frontend/assets/css/variables.scss +++ b/frontend/assets/css/variables.scss @@ -2,7 +2,7 @@ --border-radius: 4px; --navbar-height: 50px; - --navbar2-height: 61px; + --navbar2-height: 56px; --padding-xl: 32px; --padding-large: 20px; diff --git a/frontend/components/bc/header/MainHeader.vue b/frontend/components/bc/header/MainHeader.vue index d229392a6..cac03d828 100644 --- a/frontend/components/bc/header/MainHeader.vue +++ b/frontend/components/bc/header/MainHeader.vue @@ -164,7 +164,7 @@ $smallHeaderThreshold: 1024px; position: relative; display: grid; grid-template-columns: 0px min-content min-content auto min-content 0px; // the 0px are paddings, useless now but they exist in the structure of the grid so ready to be set if they are wanted one day - grid-template-rows: var(--navbar-height) min-content; + grid-template-rows: var(--navbar-height) minmax(var(--navbar2-height), min-content); @media (max-width: $smallHeaderThreshold) { grid-template-columns: 0px min-content auto min-content 0px; // same remark about the 0px grid-template-rows: var(--navbar-height) min-content;