Skip to content

Commit 923b7c3

Browse files
bryant22claude
andcommitted
fix(ui): mobile overlay, hatch dropouts, stacked hero buttons, larger title
Four mobile issues. 1. The menu overlay was broken in both themes. Two causes, and the first hid the second: - .menu is positioned and the nav's .pad was static, so the fixed scrim painted OVER the bar, dimming the logo and the close control. - Stacking .pad above it was not enough: .pad has no background of its own, so the scrim showed straight THROUGH the transparent bar and it still read as dimmed. It has to be opaque as well as stacked. Now the bar stays at full brightness while the page behind it dims, which is what an overlay is supposed to look like. 2. The hatch pattern dropped stripes on phones. A hard colour stop (var(--hatch) 0 1px, transparent 1px ...) gives the rasteriser nothing to antialias against, so on a rotated axis at fractional device-pixel ratios individual stripes vanish and the spacing reads ragged. Ramping to transparent over ~1px lets it antialias; the pattern is even at any DPR. 3. Hero buttons stack and fill below 560px. Two side-by-side pills at phone width left each too narrow to read as a primary action. 4. Hero title floor 1.85rem -> 2.2rem. Below ~650px the clamp floor was doing all the work and 1.85rem is small for the page's primary statement. 494 tests pass; tsc --noEmit clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 86b2379 commit 923b7c3

1 file changed

Lines changed: 23 additions & 3 deletions

File tree

‎src/views.ts‎

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,16 +173,22 @@ code,.mono,.rep-host,.rep-crumb{font-family:var(--mono);overflow-wrap:anywhere}
173173
174174
/* Headings take the sans; anything the machine produced stays mono. */
175175
h1,h2,h3{font-family:var(--sans);margin:0;text-wrap:balance}
176-
h1{font-weight:700;letter-spacing:-.028em;line-height:1.06;font-size:clamp(1.85rem,5.2vw,3.4rem)}
176+
h1{font-weight:700;letter-spacing:-.028em;line-height:1.06;font-size:clamp(2.2rem,7vw,3.4rem)}
177177
h2{font-weight:700;letter-spacing:-.024em;line-height:1.1;font-size:clamp(1.4rem,3.4vw,2.15rem)}
178178
h1 em,h2 em{font-style:normal;color:var(--teal)}
179179
180180
/* The page is a certificate: one framed sheet, everything ruled inside it. */
181181
.sheet{max-width:1320px;margin:0 auto;border-inline:1px solid var(--rule);min-height:100vh;background:var(--paper)}
182182
.pad{padding-inline:clamp(1rem,3.5vw,2.5rem)}
183183
/* Hatching marks a region that carries no reading — separators only. */
184+
/* The stripe stop is SOFT on purpose. A hard stop (var(--hatch) 0 1px,
185+
transparent 1px ...) gives the rasteriser nothing to antialias against, so on
186+
a rotated axis at fractional device-pixel ratios individual stripes drop out
187+
and the spacing reads ragged — most visible on phones. Ramping to transparent
188+
over ~1px lets it antialias and the pattern stays even at any DPR. */
184189
.hatch{height:22px;border-block:1px solid var(--rule);
185-
background-image:repeating-linear-gradient(-45deg,var(--hatch) 0 1px,transparent 1px 7px)}
190+
background-image:repeating-linear-gradient(-45deg,
191+
var(--hatch) 0, var(--hatch) 1px, transparent 2px, transparent 8px)}
186192
187193
.eyebrow{font-family:var(--mono);font-size:.66rem;letter-spacing:.16em;text-transform:uppercase;
188194
color:var(--ink-soft);display:flex;align-items:center;gap:.5rem;margin:0}
@@ -227,7 +233,15 @@ h1 em,h2 em{font-style:normal;color:var(--teal)}
227233
#menu precedes the nav in the DOM purely so a sibling combinator can reach
228234
the trigger; being absolutely positioned, its DOM order does not affect
229235
where it renders. */
230-
.menu{display:none;position:absolute;top:100%;left:0;right:0}
236+
/* The nav must sit ABOVE the scrim. .menu is positioned and the nav's .pad is
237+
static, so without these the fixed scrim paints over the bar itself and dims
238+
the logo and the close control — the overlay looks broken in both themes.
239+
The panel drops to top:100%, below the bar, so nothing is hidden by this. */
240+
/* Opaque, not just stacked above: .pad has no background of its own, so the
241+
scrim painted straight THROUGH the transparent bar and the nav still read
242+
as dimmed. Matches --paper, so nothing changes when the menu is closed. */
243+
.navwrap>.pad{position:relative;z-index:2;background:var(--paper)}
244+
.menu{display:none;position:absolute;top:100%;left:0;right:0;z-index:1}
231245
.menu:target{display:block}
232246
@media(min-width:821px){.menu{display:none !important}}
233247
.menu-scrim{position:fixed;inset:0;background:var(--scrim)}
@@ -494,6 +508,12 @@ function landingCss(): string {
494508
.hero h1{margin:1.1rem auto 0;max-width:26ch}
495509
.hero .lede{margin:1.1rem auto 0}
496510
.actions{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:1.75rem;justify-content:center}
511+
/* Phones: stack and fill. Two side-by-side pills at this width leave each one
512+
too narrow to read as a primary action. */
513+
@media(max-width:560px){
514+
.actions{flex-direction:column;align-items:stretch}
515+
.actions .btn{width:100%}
516+
}
497517
.trust{display:flex;flex-wrap:wrap;gap:.4rem 1.5rem;margin-top:1.35rem;justify-content:center;
498518
font-family:var(--mono);font-size:.72rem;color:var(--ink-soft)}
499519
.trust span{display:inline-flex;align-items:center;gap:.45rem}

0 commit comments

Comments
 (0)