Fix topnav horizontal overflow on mobile
.nav-links had no min-width:0/overflow-x handling, so on narrow screens flex items (brand, nav links, user-menu) refused to shrink below content size and pushed .topnav-inner past the viewport width — showing as a horizontal scrollbar (or requiring pinch-zoom-out to see everything). Nav links now scroll horizontally within their own row instead; brand and user-menu no longer shrink; email hidden and brand collapses to just the mark below 640px to leave room. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QcXH24ky6zjk2UyK5oZUPH
This commit is contained in:
1 parent
bcf0e86618
commit
3e7318364b
1 file changed
+34
@@ -402,6 +402,7 @@ select.input {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
flex-shrink: 0;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
letter-spacing: -0.01em;
|
letter-spacing: -0.01em;
|
||||||
@@ -419,14 +420,27 @@ select.input {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
|
/* Flex items don't shrink below their content size by default, so without
|
||||||
|
min-width:0 this row would push .topnav-inner (and the page) wider than
|
||||||
|
the viewport on narrow screens instead of scrolling internally. */
|
||||||
|
min-width: 0;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
overflow-x: auto;
|
||||||
|
scrollbar-width: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-links::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-link {
|
.nav-link {
|
||||||
|
flex-shrink: 0;
|
||||||
padding: 7px 12px;
|
padding: 7px 12px;
|
||||||
border-radius: var(--radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
|
white-space: nowrap;
|
||||||
transition: background 0.12s ease, color 0.12s ease;
|
transition: background 0.12s ease, color 0.12s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -444,6 +458,7 @@ select.input {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-email {
|
.user-email {
|
||||||
@@ -451,6 +466,25 @@ select.input {
|
|||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 640px) {
|
||||||
|
.topnav {
|
||||||
|
padding: 0 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topnav-inner {
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand {
|
||||||
|
font-size: 0;
|
||||||
|
gap: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-email {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------- Auth pages ---------- */
|
/* ---------- Auth pages ---------- */
|
||||||
|
|
||||||
.auth-shell {
|
.auth-shell {
|
||||||
|
|||||||
Reference in new issue
Block a user