Hello Old Friend
Remember back in the good old days? The days when our stylesheets were littered with ‘px’ font sizes and all was naively well? Guess what? Those days are here again.
For quite some time now I’ve been using Yahoo’s great font and reset styles in every new project. Basically, they normalize font sizing issues using percentages. 100% is 13px and they have a chart up and down to attain the other pixel sizes you may need.
The other day as I started a new project, it hit me. Safari is now on ‘roids. Firefox 3 is not too far behind. And Internet Explorer 7, well IE7 now does the ’zoom’ of the whole page rather than just shifting font sizes up. The only browser that has problems with resizing pixel-based font sizes is Internet Explorer 6, right? And now is the time, if there ever was one, to begin IE6’s deprecation.
I’m not gonna lie, I immediately fired up my text editor and starting littering, nay, joyously smashing ‘13px’ and ‘48px’ (just because) all over my stylesheet. And you know what? It felt great.
Now there are those who enjoy percentages and em’s already and they probably won’t take kindly to this but frankly, I just don’t enjoy math that much 1. I hereby declare pixel font sizes safe to use once again.
body { font-size:12px; }
Note: I checked around with a few people to make sure I wasn’t hog crazy before posting this. If I am in fact hog crazy and coincidentally the people I asked also are, feel free to point it out in the comments. I’m not above being wrong.
1 I was going to be much more harsh on those who would continue to use percentages and em based font sizes, telling them that they were obviously wrong, but I’ll leave that kind of stuff to Jeff Croft. :)