Skip to content

Commit 1ab2915

Browse files
troke12cursoragent
andcommitted
fix: mobile menu full-width separator lines (100vw menu + box-shadow)
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 83449c2 commit 1ab2915

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

frontend/src/components/Navbar.css

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ a.btn-nav {
127127
font-size: 1.25rem;
128128
}
129129

130-
/* Mobile Menu */
130+
/* Mobile Menu - full viewport width so separator lines span edge-to-edge */
131131
.navbar-menu-mobile {
132132
display: none;
133133
flex-direction: column;
@@ -137,6 +137,9 @@ a.btn-nav {
137137
max-height: 0;
138138
overflow: hidden;
139139
transition: max-height 0.25s ease;
140+
width: 100vw;
141+
margin-left: calc(-50vw + 50%);
142+
box-sizing: border-box;
140143
}
141144

142145
.navbar-menu-mobile.open {
@@ -151,7 +154,6 @@ a.btn-nav {
151154
font-size: 0.9375rem;
152155
transition: var(--transition);
153156
border: none;
154-
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
155157
background: transparent;
156158
color: white;
157159
text-align: left;
@@ -161,6 +163,14 @@ a.btn-nav {
161163
cursor: pointer;
162164
width: 100%;
163165
-webkit-tap-highlight-color: transparent;
166+
box-sizing: border-box;
167+
position: relative;
168+
/* Full-width separator via box-shadow so it always spans the full menu width */
169+
box-shadow: inset 0 -1px 0 0 rgba(255, 255, 255, 0.15);
170+
}
171+
172+
.btn-nav-mobile:last-child {
173+
box-shadow: none;
164174
}
165175

166176
.btn-nav-mobile:hover:not(:disabled) {

0 commit comments

Comments
 (0)