Skip to content

Commit 459bb8a

Browse files
Mazizovaclaude
andcommitted
Fix main-menu submenu closing before it can be reached (#46)
The dropdown sits 0.25rem below its trigger, and that gap isn't part of the hovered .nav-item--dropdown, so the cursor loses :hover on the way down — easy to hit with a touchpad — and the submenu disappears. Bridge the gap with an invisible ::before on the menu (disabled in the mobile layout, where the menu is static) so hover is continuous without changing how the menu looks. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 88ec796 commit 459bb8a

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎assets/scss/_header.scss‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,18 @@
195195
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
196196
z-index: 10;
197197

198+
// Invisible bridge over the margin-top gap: without it the cursor leaves
199+
// the hovered .nav-item--dropdown on its way down (easy to do with a
200+
// touchpad) and the menu closes before an item can be reached.
201+
&::before {
202+
content: "";
203+
position: absolute;
204+
top: -0.5rem;
205+
left: 0;
206+
right: 0;
207+
height: 0.5rem;
208+
}
209+
198210
a {
199211
padding: 0.5rem 0.75rem;
200212
border-radius: 6px;
@@ -292,6 +304,8 @@
292304
padding: 0 0 0 1rem;
293305
margin: 0;
294306

307+
&::before { display: none; }
308+
295309
a {
296310
padding: 0.625rem 1rem;
297311
font-size: 0.9375rem;

0 commit comments

Comments
 (0)