« iPhone 4 Review | Main | iOS 4 Web App Home Screen Icon Bug »

June 23, 2010

9 Favorites

  • Alex Bain
  • Taichi Kaminogoya
  • Pfunk507
  • Gercek Karakus
  • Anil Dash
  • Matt Jacobs
  • Brad Choate
  • Nick
  • Tabitha

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Dorian Muthig

Pixel doubling is WRONG, we have the DPI parameter and the point unit (pt) for a reason. Pixels have to stay absolute display pixels, you can't just slab layers over layer on top to abstract the original purpose because you used it wrong before... (DPI settings aren't for zooming, if you didn't know)

Iljitsch Van Beijnum

Doing anything pixel-based is even wronger. That practice is just an artifact of our very low display resolutions. The faster we get good resolutions, the faster we can leave thoughts about pixels behind, just like we did with printers.

By the way, the old iPhone already did a lot of magic behind the curtains: it reports that its screen is actually 980 pixels wide and then maps those 980 virtual pixels to 320 (portrait) or 480 (landscape) real pixels. And then there's the zooming. So with the iPhone 4 it's actually 980 -> 960 (or maybe they changed the virtual screen size to 960) so it's closer to a 1-to-1 mapping than the older iPhone, so providing higher resolution images to the iPhone 4 than to computer browsers seems strange.

Mathias Bynens

It’s much better to just use inline media queries in your CSS instead of separate files (to save an additional HTTP request)

http://twitter.com/mathias/status/16881506343

Chris

We're all using SVG for our graphics now, so media queries for high-res mobile devices isn't necessary. Right? Right?

Tim

Stop using px units in CSS! Use points, or even better, use points for your base text size and then ems for images, that way you guarantee the proportion of you images and text will remain the same on any device. Using ems means that when a user alters the text size in their browser settings that the images resize too.

Thanks to the @fontface and other CSS3 attributes we don't need to use images for heading text anymore. For images try to use SVG. Where bitmaps have to be used make sure that they are high resolution and let the browser scale them. They do a much better job of this now than they used to. The magic number used to be 288dpi, as both 96dpi, the assumed resolution of Windows, and 72dpi, the assumed resolution of Mac OS are factors which makes for easy scaling for the browser, even older ones. I've been building websites this way since CSS1 made it all possible.

The iPhone 4 display is slightly higher at 326dpi. I don't know how well the device will scale up.

The px unit should only ever be used to get hairline width lines with a constant 1px weight.

Iljitsch Van Beijnum

Tim: the DPI is meaningless on the web, unless you know both the absolute size of the screen and its resolution. But you never want an image to have the same absolute size on both a large monitor and the iPhone's screen. What you want is the same relative size: half the browser window on the computer vs half the screen on the iPhone. In both cases that could be about 500 pixels, but you never know.

Also, scaling algorithms used by today's browsers are advanced enough that there's really no penalty for using fractional factors rather than 2 or 4 x. So something in the neighborhood of 12 pixels/mm (300 DPI for those still living in the imperial dot-based world) should be fine for anything photo-realistic.

Arlen

Umm, Dorian? No, when it comes to CSS a pixel is *not* an single absolute display pixel, and never has been: http://www.w3.org/TR/CSS21/syndata.html#length-units

The spec builders recognized the day of hi-res devices was coming, and built the spec to acknowledge it. What Apple appears to be ignoring is the suggestion by the spec that the user-agent automatically do the conversions.

bobthebob

gee - if only we could use Flash we'd have vector graphics... oh well.

James

I'm confused. A pixel measurement is still a pixel though, right? If you have an html element of x pixels, and an image of x pixels, they still appear the same size on screen, yes? Otherwise, that'd be stupid.

Mig Reyes

@bobthebob → SVG = vector, no need for Flash.

Lindsay

James.. A pixel is always a pixel, but it is never an absolutely size.. For instance you can say that a centimeter is actually .4" so there is a finite size.. It will aways be exactly .4" or 1 centemeter.

HOWEVER, i a pixel is not always .5 centemeters... On different displays the size of the pixel is different based on the DPI and resolution and all of that jazz. I dont know enough about DPI and resolution and how monitors map that stuff to comment..

But a pixel is NOT a measurement and is not always the same size.

Patrick Garde

Got to agree with Mig, SVG is also vector. We don't need Flash in iPhone 4.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Microfeed

Loading…

Other Accounts

Delicious Dopplr Facebook Flickr GitHub LinkedIn Twitter TypePad Vimeo YouTube
Blog powered by TypePad
Member since 04/2004