Skip to content

Fix meals grid cells too wide on small screens - #54

Merged
injoon5 merged 2 commits into
mainfrom
cursor/meals-grid-cell-width-2418
Aug 21, 2026
Merged

injoon5 merged 2 commits into
mainfrom
cursor/meals-grid-cell-width-2418

Conversation

@injoon5

@injoon5 injoon5 commented Aug 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • On phones, /meals day cells blew past the intentional 37rem scroll floor — only ~2 oversized columns showed up.
  • Cause: the pan box used width: max(100%, 37rem) under HScroll’s w-max wrapper. That % is cyclic, so layout fell back to dish-name intrinsic width (~1183px pan / ~237px cells at 390px viewport in a repro).
  • Fix: make HScroll a size container and size the meals pan box with max(100cqw, 37rem) against the port (~592px / ~118px cells, ~3.3 columns visible). Also min-w-0 on cells so long dishes truncate inside the track.

Test plan

  • /meals at ~390px wide: ~3 day columns visible; pan box ≈ 37rem (not content-sized)
  • Long dish names ellipsize; drawer still shows the full name
  • Wide desktop: columns still fill the content width
  • Horizontal pan + 중식/석식 height tween still work
  • Timetable / calendar HScroll still pans as before
Open in Web Open in Cursor 

CSS Grid's 1fr tracks are minmax(auto, 1fr), so long nowrap dish
names inflated every column past the 37rem pan-box floor. Use
minmax(0, 1fr) and min-w-0 so cells stay within that floor and
truncate instead of widening the row.

Co-authored-by: Injoon Oh <injoon5@icloud.com>
@vercel

vercel Bot commented Aug 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
class-info Error Error Aug 21, 2026 2:40pm

Percentage width under HScroll's w-max wrapper is cyclic, so long
nowrap dishes inflated the row past 37rem (~2 oversized columns on
a phone). Mark the scroll port as an inline-size container and use
max(100cqw, 37rem); keep min-w-0 on day cells so dishes truncate.

Co-authored-by: Injoon Oh <injoon5@icloud.com>
@injoon5
injoon5 marked this pull request as ready for review August 21, 2026 14:50
@injoon5
injoon5 merged commit 20723b7 into main Aug 21, 2026
2 of 3 checks passed

This branch had an error being deployed

1 failed deployment
Preview — ab0f42b4 Deployed Aug 21, 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