Repository navigation
Stop the mobile drawer search overflowing - #30
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: hiddenclipped it, so the button was partly unreachable.Cause: single-column grid with an
autocolumn floored at the form's min-content width, andmin-width: autoon the input holding it at its size attribute (~203px).Fix:
grid-template-columns: minmax(0, 1fr),min-width: 0on the form, wrapper and input, andflex: 0 0 autoon the button.