16px or Larger Text Prevents iOS Form Zoom

This was a great “Today I Learned” for me from Josh W. Comeau. If the font-size of an <input> is 16px or larger, Safari on iOS will focus into the input normally. But as soon as the font-size is …


The post 16px or Larger Text Prevents iOS Form Zoom appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.


This content originally appeared on CSS-Tricks and was authored by Chris Coyier

This was a great “Today I Learned” for me from Josh W. Comeau. If the font-size of an <input> is 16px or larger, Safari on iOS will focus into the input normally. But as soon as the font-size is 15px or less, the viewport will zoom into that input. Presumably, because it considers that type too small and wants you to see what you are doing. So it zooms in to help you. Accessibility. If you don’t want that, make the font big enough.

Here’s Josh’s exact Pen if you want to have a play yourself.

In general, I’d say I like this feature. It helps people see what they are doing and discourages super-tiny font sizes. What is a slight bummer — and I really don’t blame anyone here — is that not all typefaces are created equal in terms of readability at different sizes. For example, here’s San Francisco versus Caveat at 16px.

San Francisco on the left, Cavet on the right. Caveat looks visually much smaller even though the font-size is the same.

You can view that example in Debug Mode to see for yourself and change the font size to see what does and doesn’t zoom.


The post 16px or Larger Text Prevents iOS Form Zoom appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.


This content originally appeared on CSS-Tricks and was authored by Chris Coyier


Print Share Comment Cite Upload Translate Updates
APA

Chris Coyier | Sciencx (2021-05-04T21:16:04+00:00) 16px or Larger Text Prevents iOS Form Zoom. Retrieved from https://www.scien.cx/2021/05/04/16px-or-larger-text-prevents-ios-form-zoom/

MLA
" » 16px or Larger Text Prevents iOS Form Zoom." Chris Coyier | Sciencx - Tuesday May 4, 2021, https://www.scien.cx/2021/05/04/16px-or-larger-text-prevents-ios-form-zoom/
HARVARD
Chris Coyier | Sciencx Tuesday May 4, 2021 » 16px or Larger Text Prevents iOS Form Zoom., viewed ,<https://www.scien.cx/2021/05/04/16px-or-larger-text-prevents-ios-form-zoom/>
VANCOUVER
Chris Coyier | Sciencx - » 16px or Larger Text Prevents iOS Form Zoom. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/05/04/16px-or-larger-text-prevents-ios-form-zoom/
CHICAGO
" » 16px or Larger Text Prevents iOS Form Zoom." Chris Coyier | Sciencx - Accessed . https://www.scien.cx/2021/05/04/16px-or-larger-text-prevents-ios-form-zoom/
IEEE
" » 16px or Larger Text Prevents iOS Form Zoom." Chris Coyier | Sciencx [Online]. Available: https://www.scien.cx/2021/05/04/16px-or-larger-text-prevents-ios-form-zoom/. [Accessed: ]
rf:citation
» 16px or Larger Text Prevents iOS Form Zoom | Chris Coyier | Sciencx | https://www.scien.cx/2021/05/04/16px-or-larger-text-prevents-ios-form-zoom/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.