From 01105f424a5df6b2904c001f3a863637e2dec4bc Mon Sep 17 00:00:00 2001 From: Razzmatazz Date: Fri, 1 Dec 2023 08:14:24 -0600 Subject: [PATCH 1/3] Make overflow menu more reliable --- src/components/menu/index.css | 13 ++++++-- src/components/menu/index.js | 32 +++++++++---------- .../menu/intersection-observer-wrapper.js | 2 +- src/components/menu/overflow-menu.js | 4 +-- 4 files changed, 29 insertions(+), 22 deletions(-) diff --git a/src/components/menu/index.css b/src/components/menu/index.css index 9f951b477..d53eb69f6 100644 --- a/src/components/menu/index.css +++ b/src/components/menu/index.css @@ -269,13 +269,13 @@ ul.menu { max-width: 100%; } -.visible-menu-item { +.visible-menu-item, .visible-overflow { order: 0; visibility: visible; opacity: 1; } -.invisible-menu-item { +.invisible-menu-item, .invisible-overflow { order: 100; visibility: hidden; pointer-events: none; @@ -302,3 +302,12 @@ ul.menu { .in-overflow-menu:hover { background-color: transparent; } + +/* margin unless it is the only item showing */ +nav.navigation ul.menu li.more-dropdown-wrapper:not(:nth-child(1 of li.visible-menu-all)) { + margin-left: -50px; +} + +nav.navigation ul.menu li:nth-last-child(1 of li.visible-menu-item):not(:nth-last-child(1 of li.overflow-member)) { + padding-right: 50px; +} diff --git a/src/components/menu/index.js b/src/components/menu/index.js index 3f85fd496..fd083bec3 100644 --- a/src/components/menu/index.js +++ b/src/components/menu/index.js @@ -114,7 +114,7 @@ const Menu = () => {