|
6 | 6 | /* Modern reset (Josh Comeau-style, trimmed) ---------------------------- */ |
7 | 7 | *, *::before, *::after { box-sizing: border-box; } |
8 | 8 | * { margin: 0; } |
9 | | -html, body { height: 100%; } |
| 9 | +/* Note: no `height: 100%` on <body>. A fixed body height plus overflowing |
| 10 | + content breaks `position: sticky` on the header (body becomes the sticky |
| 11 | + containing block and its scroll port ends before the content does). |
| 12 | + `min-height: 100svh` below handles the "fill the viewport" case. */ |
| 13 | +html { height: 100%; } |
10 | 14 | html { |
11 | 15 | -webkit-text-size-adjust: 100%; |
12 | 16 | -webkit-tap-highlight-color: transparent; |
13 | 17 | scroll-behavior: smooth; |
14 | 18 | color-scheme: dark; |
15 | 19 | font-feature-settings: "ss01", "cv11"; |
16 | 20 | background: var(--c-bg-0); |
| 21 | + /* Prevents horizontal scroll from decorative overflow (hero art rings, |
| 22 | + long no-wrap buttons) without creating a scroll container — required |
| 23 | + so `.nav { position: sticky }` keeps working on mobile. */ |
| 24 | + overflow-x: clip; |
17 | 25 | } |
18 | 26 | @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } } |
19 | 27 |
|
|
25 | 33 | background: var(--c-bg-0); |
26 | 34 | -webkit-font-smoothing: antialiased; |
27 | 35 | text-rendering: optimizeLegibility; |
28 | | - overflow-x: hidden; |
29 | 36 | min-height: 100svh; |
30 | 37 | } |
31 | 38 |
|
@@ -131,7 +138,7 @@ a:hover { color: var(--c-link-hover); } |
131 | 138 | .container--wide { max-width: var(--container-w-wide); } |
132 | 139 | .container--full { max-width: none; padding-inline: 0; } |
133 | 140 |
|
134 | | -section { position: relative; padding-block: var(--section-py); } |
| 141 | +section { position: relative; padding-block: var(--section-py); overflow-x: clip; } |
135 | 142 | section + section::before { |
136 | 143 | content: ""; |
137 | 144 | position: absolute; |
|
0 commit comments