Thanks Chris, I'll go bring it up on the relevant w3.org lists (I'm guessing I'll start on public-HTML-comments) and see where that takes me, after refining my idea a bit to use more conventional naming, and to hopefully account for other scales than 2x in an elegant manner.
I just wanted to make sure no one here told me "don't bother, we've got superior solution x in the works", or "due to y, that's not gonna fly!" Surely, 2x images can be implemented in a sane and efficient manner for web developers. -Tom On Apr 25, 2012, at 10:23 AM, Chris Hutten-Czapski <chut...@rim.com> 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 > > Not to be too cute about it, but CSS dpi is _always_ 96 CSS pixels per CSS > inch. What this means onscreen is (almost) completely up to the user-agent. > This is (potentially) why the resolution media query is defined (via the very > link above) to only work for bitmap media types, not screen. > > Dealing with hardware that has a screen dpi much higher than what CSS > prescribes for a device at its viewing distance (viewing distance matters: > http://www.w3.org/TR/css3-values/#reference-pixel ) is a hard problem, and is > one that is being discussed at length on the previously-mentioned threads and > elsewhere. > > The iPhone seems to handle it by introducing a third type of pixels between > hardware and CSS (a device/density-independent-pixel, or dip) that allows > them to pretend that even the new iPhone has only 320px of width in portrait. > BlackBerry has done other things at various times, currently taking advantage > of dpi scaling (a little of which you can see in > BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments > ). Android and Chrome-for-Android also have congruent practices, even > exposing some of it to authors using target-densitydpi. > > Using HTML attributes and CSS properties to offload the effort of supporting > multiple densities to the author from the user-agent might be the best way to > solve this problem. I'm not as conversant in all the points as I feel I'd > need to be to render a full opinion, but my uneducated opinion is that this > sounds kinda hackish. > > Regardless, this indeed seems like it should be discussed by the standards > bodies, not webkit-dev. > > Style, > > Chris H-C > > --------------------------------------------------------------------- > This transmission (including any attachments) may contain confidential > information, privileged material (including material protected by the > solicitor-client or other applicable privileges), or constitute non-public > information. Any use of this information by anyone other than the intended > recipient is prohibited. If you have received this transmission in error, > please immediately reply to the sender and delete this information from your > system. Use, dissemination, distribution, or reproduction of this > transmission by unintended recipients is not authorized and may be unlawful. _______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev