30 Sep 2009

iphone safari font size changes on rotation

i've been doing some web development targetting iphone, and one of the things you have to learn to support is rotation.

one thing that has annoyed me recently is that when you rotate, the font size changes. google didn't reveal anything, so i thought i'd blog here about it.

if you set:

html {
-webkit-text-size-adjust: none;

then it will not automatically adjust the fonts of the page when it rotates. the downside of this is that the font size also does not adjust in a regular webkit browser. but if you're targetting iphone specifically, then it is not such a big deal.

You can reply to me about this on Twitter: