Skip to content

Stop the mobile drawer search overflowing - #30

Merged
alanw707 merged 1 commit into
mainfrom
fix/mobile-drawer-search-overflow-2026-11-22
Nov 23, 2026
Merged

alanw707 merged 1 commit into
mainfrom
fix/mobile-drawer-search-overflow-2026-11-22

Conversation

@alanw707

Copy link
Copy Markdown
Owner

Measured on production at 320/344/360/375/390/412px: the search form was a constant 332px while the drawer shrank to 288px at 320px, pushing the submit button up to 51px outside the drawer. The drawer's overflow: hidden clipped it, so the button was partly unreachable.

Cause: single-column grid with an auto column floored at the form's min-content width, and min-width: auto on the input holding it at its size attribute (~203px).

Fix: grid-template-columns: minmax(0, 1fr), min-width: 0 on the form, wrapper and input, and flex: 0 0 auto on the button.

The drawer is a single-column grid with an auto column, so it floored at the
search form's min-content width: the input's default min-width (~203px) plus
the submit button made the form 332px inside a 288px drawer. The button was
clipped and unreachable on phones narrower than about 375px.

Grid column is now minmax(0, 1fr), and the form, wrapper and input all carry
min-width: 0 so the field can shrink while the button keeps its intrinsic
width.
@alanw707
alanw707 merged commit 23ab2b3 into main Nov 23, 2026
6 of 7 checks passed
@alanw707
alanw707 deleted the fix/mobile-drawer-search-overflow-2026-11-22 branch November 23, 2026 04:11
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.

1 participant