Skip to content

fix(launch-announcement): make spacing fluid so it does not step where the layout holds - #33

Merged
scheemunai merged 1 commit into
mainfrom
fix/launch-announcement-fluid-spacing
Sep 5, 2026
Merged

fix(launch-announcement): make spacing fluid so it does not step where the layout holds#33
scheemunai merged 1 commit into
mainfrom
fix/launch-announcement-fluid-spacing

Conversation

@scheemunai

Copy link
Copy Markdown
Owner

The defect

@media (min-width: 48rem) declared only spacingpadding-inline on .wrap, padding-block on section and .hero — and nothing structural. A reader at 768px received a measure set for a layout they did not have: section padding jumped 0.62rem → 2.6rem (4×) while the grid was identical either side.

767 -> 768 -> 769     height 2224 -> 2601 -> 2602     step 377px across one pixel of width

The fix

Route 1 of the two offered — make the change fluid, matching the clamp() font-size idiom this template already uses in three places.

The ramp is anchored at 392px so 390 clamps to the original floor and 768 reaches the original ceiling exactly. Both sampled widths are unchanged in output; only the band between them — the band that carried the defect — is affected. The spacing-only breakpoint is removed.

Verification

width before after delta
390 2838 2838 0
768 2601 2601 0
1440 2128 2128 0
boundary   767->768 step   377px -> 1px
overflow   0 at all 201 widths sampled 320-1920
blocks     3 remaining boundaries, all declare layout (22rem, 34rem, 62rem)
gates      pnpm check exit 0 (0 warnings on this file) - vitest 1096 passed, exit 0

Viewport was read back via window.innerWidth before every recorded measurement; the run refuses on mismatch.

Not done

Nothing deleted, no line-height compressed, no structural element removed.

🤖 Generated with Claude Code

…e the layout holds

The `@media (min-width: 48rem)` block declared only spacing — `padding-inline`
on `.wrap`, `padding-block` on `section` and `.hero` — and nothing structural.
A reader at 768px therefore received a measure set for a layout they did not
have: `section` padding jumped 0.62rem to 2.6rem, a 4x step, while the grid was
identical either side. Height stepped 377px across a single pixel of width.

The three values are now `clamp()`, matching the fluid `font-size` idiom already
used elsewhere in this template. The ramp is anchored so that 390px clamps to the
original floor and 768px reaches the original ceiling exactly, so both sampled
widths are byte-for-byte unchanged in output and only the band between them —
the band that carried the defect — is affected. The spacing-only breakpoint is
removed; the three remaining boundaries all declare layout.

Nothing was deleted, no line-height was compressed, no structural element removed.

  heights   390: 2838 -> 2838   768: 2601 -> 2601   1440: 2128 -> 2128
  boundary  767->768 step 377px -> 1px
  overflow  0 at all 201 widths sampled from 320 to 1920

Co-Authored-By: CRHQ <noreply@crhq.ai>
@scheemunai
scheemunai merged commit 1fbb339 into main Sep 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants