I'm loving responsive design and am slowly updating all my websites to support mobile browsers as well as tablets. Currently Hanselman.com (this site), Hanselminutes.com (my weekly podcast), SpeakingHacks.com (a video I sell on how to be a better presenter) as well as LostPhoneScreen.com (where I sell my Windows Phone 7 application.)
All of this "mobilization" has stemmed from my frustration with other folks' sites that look lousy on my phone. It's SO frustrating to reach a site that could take 10 minutes and make its mobile experience 100% better.
Now that I've updated my main sites I'm tidying up a few things that continue to bug me. On my iPhone 4S with a DPI of 326 dpi, the logo on my site and a few other graphics look lousy. Why?
Well, for example, the image for the logo is a PNG that is literally 100px by 100px. This is a foreground image (not a CSS background image on an elements, yes, people still use those) and it has its height and width both set to 100px. The size of the image and the img tag are both really 100x100.

You can see that not only is the logo blurry but the search magnifying glass and social icons are as well. That's because the browser has scaled up the images to manage the super high-res display of this device. Better that they scale it up than make it too tiny. The overall size of all the other elements on the page are scaled up as well so the fonts and form elements like the dropdown are crystal clear.
There's a few ways to fix this.
Support (High DPI) Retina Display with CSS Background Images
Since I am already using CSS Media Queries to change my site's CSS for smaller screens like this already:
@media screen and (max-width:720px)
{
}
I can certainly do the same and detect high resolution displays. It's not just the iPhone. A lot of the newer Nokias and HTCs have displays over 200dpi.
I could create a media query like this:
@media screen and (min-device-pixel-ratio: 2) {
}
Or do conditional inclusion like this (or -webkit-min-device-pixel-ratio):
<link rel="stylesheet" media="screen and min-device-pixel-ratio: 2" href="justforhighres.css"/>
Do your testing and be aware you likely need to use both the webkit prefix and one without:
only screen and (-webkit-min-device-pixel-ratio : 2),
only screen and (min-device-pixel-ratio : 2) {
}
You may decide that 1.5 is a better ratio for you.
The WebKit folks are thinking about this and I could use background-size like this:
div {
background: url(logo-low.png);
background: url(logo-high.png) (100px 100px);
}
Handling Foreground Images (with the IMG tag)
Ideally I should be using SVG (Scalable Vector Graphics) for my images like the magnifying glass and they'll scale everywhere