Skip to content

Instantly share code, notes, and snippets.

@borismus
Created April 18, 2012 04:09
Show Gist options
  • Save borismus/2411058 to your computer and use it in GitHub Desktop.
Save borismus/2411058 to your computer and use it in GitHub Desktop.
What is the variance in pixel sizes across devices? Compute it.
Since we have so many devices, pixels don't make sense anymore. Leave it
to somebody else.
I'd like to just say "this button is 5x5cm" and scale stuff
appropriately. CSS pixels suck since they aren't really pixels. Apple
guidelines say 44x44px as min size but this is fundamentally about the
real size of the display, not pixels. Actually double check iPad vs
iPhone.
Forget pixels. In media queries too.
What really matters is physical screen size. Desktops have the same
resolution as tv... And many tablets have same resolution as phones.
With physical sizes you can easily distinguish 7" and 10" tablets, for
example. This is very very hard to do with just pixels.
Demo of a cm based interface with a js shim.
Next steps
* cm as a unit in w3 specs
* get physical-width mq
http://developer.apple.com/library/ios/ipad/#documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment