Commit 9333223
committed
fix(nav): prevent mobile top bar overflow on narrow phones
The mobile nav was overflowing on narrow viewports: "Tools ▼" wrapped
(arrow dropped to a second line) and the language switcher clipped
off the right edge of the screen. Root cause: no nowrap on inline
items, desktop-sized margins/padding applied to phone widths, and
too many items competing for space on <420px screens.
- Add `white-space: nowrap` and `flex-shrink: 0` to .logo, .navLink,
.dropdownWrapper, .dropdownButton so labels can't wrap or be
crushed by siblings.
- New ≤520px breakpoint: tighter container padding, tighter link
padding, and smaller inter-item margins.
- New ≤420px breakpoint: hide the Contact link entirely (still
reachable from the footer) so the language switcher has room.
- Apply a new .contactLink modifier class in Nav.tsx so the media
query has a scoped target.
Verified at 320/375/414/480/768px — zero children overflow the
viewport, Tools button stays on one line, EN switcher fully visible.1 parent 879297d commit 9333223
2 files changed
Lines changed: 33 additions & 1 deletion
File tree
- src/components/layout
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| 55 | + | |
| 56 | + | |
53 | 57 | | |
54 | 58 | | |
55 | 59 | | |
| |||
68 | 72 | | |
69 | 73 | | |
70 | 74 | | |
| 75 | + | |
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
| |||
79 | 84 | | |
80 | 85 | | |
81 | 86 | | |
| 87 | + | |
82 | 88 | | |
83 | 89 | | |
84 | 90 | | |
| |||
251 | 257 | | |
252 | 258 | | |
253 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
254 | 286 | | |
255 | 287 | | |
256 | 288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| |||
0 commit comments