|
55 | 55 | --shadow: 0 1px 4px rgba(0, 0, 0, 0.12); |
56 | 56 | /* mvp.css caps header/footer/main at --width-content (1080px by default). |
57 | 57 | Report pages and listings should fill the view: content uses 95% of the |
58 | | - viewport width instead. */ |
| 58 | + viewport width instead. (The top menu opts out entirely — #top-menu |
| 59 | + sets max-width: none so the menu surface reaches the page edges.) */ |
59 | 60 | --width-content: min(3840px, 95vw); |
60 | 61 | } |
61 | 62 |
|
@@ -289,14 +290,24 @@ pre { |
289 | 290 | whole rendered box (padding contributes outside max-height). */ |
290 | 291 | padding: 0; |
291 | 292 | max-height: var(--menu-max-height); |
| 293 | + /* mvp.css also caps every header at --width-content; the menu surface |
| 294 | + must reach the left and right edges of the page instead. */ |
| 295 | + max-width: none; |
292 | 296 | } |
293 | 297 |
|
294 | 298 | .menu-bar { |
295 | 299 | display: flex; |
296 | 300 | align-items: center; |
297 | 301 | gap: 0.4rem; |
298 | 302 | flex-wrap: nowrap; |
299 | | - max-width: 1200px; |
| 303 | + /* The menu surface (#top-menu) spans the full viewport, but its content |
| 304 | + keeps the centered --width-content column. border-box makes the cap |
| 305 | + bound the rendered box (padding inside), matching .theme-bar so the |
| 306 | + two rows' content edges align. The margin: 0 auto both centers the |
| 307 | + column and resets mvp.css's 7rem nav margin — without the reset the |
| 308 | + bar's bottom margin pushes #top-menu past its max-height cap. */ |
| 309 | + max-width: var(--width-content); |
| 310 | + box-sizing: border-box; |
300 | 311 | margin: 0 auto; |
301 | 312 | padding: 0.3rem 0.8rem; |
302 | 313 | min-height: 48px; |
@@ -382,12 +393,12 @@ pre { |
382 | 393 | /* ---- Breadcrumbs (user/report trail under the top menu) ---- */ |
383 | 394 | .breadcrumbs { |
384 | 395 | /* Lives on the .theme-bar row (rendered by app/layout.jsx), sharing the |
385 | | - line with the color theme toggle: the row owns the menu-column |
386 | | - alignment formula (max-width: var(--width-content) + 0.8rem horizontal |
387 | | - padding, see .theme-bar above), so the trail must add no box-model |
388 | | - offsets of its own — flex-grow fills the row's left side, keeping the |
389 | | - first crumb's glyph at the menu bar's left content edge while the |
390 | | - toggle pins to the right edge, both vertically centered. */ |
| 396 | + line with the color theme toggle: the row carries the menu-column |
| 397 | + alignment formula (max-width: var(--width-content) + 0.8rem horizontal |
| 398 | + padding, see .theme-bar below), so the trail must add no box-model |
| 399 | + offsets of its own — flex-grow fills the row's left side, keeping the |
| 400 | + first crumb's glyph at the menu bar's left content edge while the |
| 401 | + toggle pins to the right edge, both vertically centered. */ |
391 | 402 | flex: 1 1 auto; |
392 | 403 | min-width: 0; |
393 | 404 | /* mvp.css gives bare nav a 7rem bottom margin, bold text and a spaced flex |
@@ -459,9 +470,9 @@ pre { |
459 | 470 |
|
460 | 471 | .hero-search { |
461 | 472 | position: relative; |
462 | | - /* Exactly half the rendered width of the top menu (#top-menu is capped by |
463 | | - mvp.css at --width-content = 1080px, full width below that) and centered |
464 | | - under it. */ |
| 473 | + /* Exactly half the menu content column (.menu-bar is capped at |
| 474 | + --width-content = 1080px, full width below that) and centered under |
| 475 | + the edge-to-edge header. */ |
465 | 476 | width: min(540px, 50vw); |
466 | 477 | margin: 1rem auto; |
467 | 478 | text-align: left; |
@@ -716,14 +727,14 @@ pre { |
716 | 727 | /* ---- Color theme toggle (three radio modes, pure-CSS switching) ---- */ |
717 | 728 | /* Row below the site header (rendered by app/layout.jsx): the breadcrumb |
718 | 729 | trail (when the route has one) on the left and the toggle on the right, |
719 | | - vertically centered on one line. The alignment formula .breadcrumbs used |
720 | | - to carry lives here now: --width-content column, 0.8rem horizontal |
721 | | - padding, border-box — keeping the first crumb's glyph at the menu bar's |
722 | | - left content edge and the toggle at its right content edge at every |
723 | | - viewport, the two edges mirroring each other. #top-menu is capped by |
724 | | - mvp.css at --width-content, so the row and the menu bar can never drift |
725 | | - apart. Crumb routes grow the trail (flex: 1 1 auto); crumb-less routes |
726 | | - leave only the toggle, pinned right by flex-end. */ |
| 730 | + vertically centered on one line. The row shares the menu bar's centered |
| 731 | + --width-content content column (the #top-menu surface around it is edge |
| 732 | + to edge, but the bar keeps the column): 0.8rem horizontal padding, |
| 733 | + border-box — keeping the first crumb's glyph at the menu bar's left |
| 734 | + content edge and the toggle at its right content edge at every viewport, |
| 735 | + the two edges mirroring each other, so the row and the menu bar can |
| 736 | + never drift apart. Crumb routes grow the trail (flex: 1 1 auto); |
| 737 | + crumb-less routes leave only the toggle, pinned right by flex-end. */ |
727 | 738 | .theme-bar { |
728 | 739 | display: flex; |
729 | 740 | align-items: center; |
|
0 commit comments