{"id":339455,"date":"2021-05-04T14:16:04","date_gmt":"2021-05-04T21:16:04","guid":{"rendered":"https:\/\/css-tricks.com\/?p=339455"},"modified":"2021-05-04T14:16:07","modified_gmt":"2021-05-04T21:16:07","slug":"16px-or-larger-text-prevents-ios-form-zoom","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/16px-or-larger-text-prevents-ios-form-zoom\/","title":{"rendered":"16px or Larger Text Prevents iOS Form Zoom"},"content":{"rendered":"\n

This was a great “Today I Learned” for me from Josh W. Comeau<\/a>. If the font-size<\/code> of an <input><\/code> is 16px or larger, Safari on iOS will focus into the input normally. But as soon as the font-size<\/code> 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. <\/p>\n\n\n\n\n\n\n\n

\n

\ud83d\udd25 Set your form inputs to have a font-size of 1rem (16px) or larger to prevent iOS Safari from automatically zooming in when tapped.

Makes such a big difference from a UX perspective!
pic.twitter.com\/6UpicwMaWE<\/a><\/p>— Josh W. Comeau (@JoshWComeau) April 7, 2021<\/a><\/blockquote>