Skip to content

Fix the Inference Day register section overflowing on mobile - #43

Merged
bassam merged 1 commit into
modelplaneai:mainfrom
charliehinojosa:inference-day-mobile-fix
Oct 20, 2026
Merged

bassam merged 1 commit into
modelplaneai:mainfrom
charliehinojosa:inference-day-mobile-fix

Conversation

@charliehinojosa

Copy link
Copy Markdown
Contributor

What and why

On phones, the "About the event" copy and the StreamYard registration form on /inference-day were cut off on the right edge (reported by Annie after the merge of #42).

Root cause: the register section's mobile grid column was 1fr (i.e. minmax(auto, 1fr)), whose auto minimum can't shrink below its content's intrinsic width. The embedded StreamYard form has a large min-content width — and iOS Safari sizes iframes to their content regardless of CSS width — so the grid track was forced wider than the viewport, dragging the About column off-screen with it. That's why both the form and the text were clipped.

The fix (CSS only, scoped to .id-page):

  • Collapse the mobile register grid to minmax(0, 1fr) and give both grid items min-width: 0, so the columns shrink to the viewport instead of to the iframe's content width.
  • Add overflow-x: clip to .id-page as a safety net so no wide child can push the page past the viewport. clip (not hidden) is used so the sticky event sub-nav keeps working.
  • Trim the form card's padding on small screens so the embed has a little more room.

Verified with a stress test that injects a 900px-wide iframe: the page scrollWidth stays equal to the viewport at 360 / 390 / 768 / 1024 / 1440. Desktop is unchanged.

Checklist

  • Ran npm run lint and npm run build locally — both pass (lint clean; the remaining <img> warnings are pre-existing).
  • Ran npm run validate-posts — passes (no blog content changed).
  • Signed off my commit with git commit -s.


Generated by Claude Code

On phones the About copy and the StreamYard registration form were cut off on
the right. The register grid's mobile column was `1fr` (i.e. `minmax(auto, 1fr)`),
whose `auto` minimum can't shrink below its content's intrinsic width. The
embedded StreamYard form has a large min-content width — and iOS Safari sizes
iframes to their content regardless of CSS — so the track was forced wider than
the viewport, dragging the About column off-screen with it.

- Collapse the mobile register grid to `minmax(0, 1fr)` and give both grid items
  `min-width: 0`, so the columns shrink to the viewport instead of to the
  iframe's content width.
- Add `overflow-x: clip` to `.id-page` as a safety net so no wide child can ever
  push the page past the viewport. `clip` (not `hidden`) keeps the sticky event
  sub-nav working.
- Trim the form card's padding on small screens so the embed has more room.

Verified with a stress test injecting a 900px-wide iframe: the page scrollWidth
stays equal to the viewport at 360/390/768/1024/1440. build, lint and
validate-posts all pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016QU1xKJitT9UNpCfjXjDxt
Signed-off-by: Charlie Hinojosa <charlie@sightbox.me>
@bassam
bassam merged commit 332f0c4 into modelplaneai:main Oct 20, 2026
2 checks passed

This branch was successfully deployed

1 active deployment
Preview — 62b9abd3 Deployed Oct 20, 2026 by vercel[bot]
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