Skip to content

Commit bab4ca3

Browse files
congwang-mkclaude
andcommitted
Fix dropdown menu hover gap with invisible bridge element
The 8px gap between the trigger and the dropdown caused the mouse to lose :hover when crossing it. Replace the gap with an invisible ::before pseudo-element that bridges the space, keeping the dropdown open while the cursor moves to it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c51c079 commit bab4ca3

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

_layouts/default.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,16 +141,25 @@
141141
.site-nav-dropdown-menu {
142142
display: none;
143143
position: absolute;
144-
top: calc(100% + 8px);
144+
top: 100%;
145145
left: 0;
146146
min-width: 260px;
147147
background: #1e293b;
148148
border: 1px solid rgba(255,255,255,0.08);
149149
border-radius: 6px;
150150
box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
151151
padding: 4px;
152+
padding-top: 12px;
152153
z-index: 1000;
153154
}
155+
.site-nav-dropdown-menu::before {
156+
content: '';
157+
position: absolute;
158+
top: -8px;
159+
left: 0;
160+
right: 0;
161+
height: 8px;
162+
}
154163
.site-nav-dropdown:hover .site-nav-dropdown-menu {
155164
display: block;
156165
}

0 commit comments

Comments
 (0)