Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Edward O'Connor <eoconnor <at> apple.com>
Subject: Re: Double-Resolution (Retina) Images - Re: -webkit-image-set
Newsgroups: gmane.os.opendarwin.webkit.devel
Date: Tuesday 24th April 2012 21:48:37 UTC (over 4 years ago)
Eric Seidel wrote:

> Assuming I'm understanding Kalle correctly, it seems this could
> already be accomplished with @media resolution?
>
> http://www.w3.org/TR/css3-mediaqueries/#resolution
>
> @media screen and (min-resolution: 264dpi) { … }
>
> Which according to:
> http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density
>
> Would match both the new iPad and the iPhone 4.

As far as the resolution media query is concerned, the resolution of the
new iPad and the iPhone 4 (and anything else with a device-pixel-ratio
of 2) is exactly 192dpi.

This is because the CSS 'dpi' unit is defined to mean dots device pixels
per *CSS inch*, and CSS inches are hardcoded to be 96 CSS pixels.

This means that—without real physical units—the resolution media query
is always redundnant with device-pixel-ratio, which a) we already
implement, and b) is easier to explain to authors than explaining why
both the new iPad and the iPhone 4 are 192 "dpi".


Ted
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
 
CD: 16ms