Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use 16px font size in search input to prevent mobile viewport zoom #801

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

brianlovin
Copy link

When an input's text is is smaller than 16px, mobile browsers like iOS Safari will zoom the viewport when the input is focused.

This change sets the search input's default size to 16px to avoid the jarring zoom interaction. Because this is difficult to override with custom CSS, or in React by overriding CSS variables, it seemed like the fastest win to make this input have 16px font-size by default.

When an input's text is is smaller than 16px, mobile browsers like iOS Safari will zoom the viewport when the input is focused.

This change sets the search input's default size to 16px to avoid the jarring zoom interaction. Because this is difficult to override with custom CSS, or in React by overriding CSS variables, it seemed like the fastest win to make this input have 16px font-size by default.
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.

None yet

1 participant