{"id":385,"date":"2016-09-23T15:00:50","date_gmt":"2016-09-23T18:00:50","guid":{"rendered":"https:\/\/wiki.samuelchopard.ch\/?p=385"},"modified":"2019-03-18T14:29:24","modified_gmt":"2019-03-18T13:29:24","slug":"disable-zoom-when-focus-in-input-on-mobile","status":"publish","type":"post","link":"https:\/\/samuelchopard.ch\/wiki\/library\/disable-zoom-when-focus-in-input-on-mobile\/","title":{"rendered":"Disable zoom when focus in input on mobile"},"content":{"rendered":"<p><!--more--><\/p>\n<p>Add this in your <a target=\"_blank\" href=\"https:\/\/samuelchopard.ch\/wiki\/2016\/05\/29\/download-blank-child-theme\/\" target=\"_blank\" rel=\"noopener noreferrer\">child-theme&#8217;s<\/a> style.css:<\/p>\n<pre class=\"EnlighterJSRAW\">@media only screen and (max-device-width: 480px) {\n\n     input {\n          font-size: 16px;\n     }\n}<\/pre>\n<p>16px appears to be the optimal font-size for reading on mobile devices. Consequently, the mobile devices stop to zoom when 16px is set as the font-size for inputs.<\/p>\n<p>&nbsp;<\/p>\n<p>Source: <a target=\"_blank\" href=\"https:\/\/jonassebastianohlsson.com\/blog\/2013\/11\/25\/how-to-stop-zoom-in-on-input-focus-on-mobile-devices\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/jonassebastianohlsson.com\/blog\/2013\/11\/25\/how-to-stop-zoom-in-on-input-focus-on-mobile-devices\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"Add this in your child-theme's style.css: @media only screen and (max-device-width: 480px) { input { font-size: 16px; } } 16px [...]","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[85,112,143,182,333],"class_list":["post-385","post","type-post","status-publish","format-standard","hentry","category-htmlcss","tag-disable","tag-focus","tag-input","tag-mobile","tag-zoom"],"_links":{"self":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts\/385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/comments?post=385"}],"version-history":[{"count":1,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts\/385\/revisions"}],"predecessor-version":[{"id":54891,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts\/385\/revisions\/54891"}],"wp:attachment":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/media?parent=385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/categories?post=385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/tags?post=385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}