[html5] Absolute Pixels in HTML 5

Felix Miata mrmazda at earthlink.net
Thu Jul 9 21:43:07 PDT 2009


On 2009/07/09 21:09 (GMT-0400) Ian Hickson composed:

> On Thu, 11 Jun 2009, Felix Miata wrote:

>> > Even on Windows with a non-96dpi, browsers today still assume 96dpi, 
>> > as far as I can tell.

>> On Windows, some assume 96 (e.g. Safari, which I reported as a Safari 
>> bug "UI text is too small for high PPI display environment" 
>> https://bugreport.apple.com/cgi-bin/WebObjects/RadarWeb.woa/61/wo/APqcRdz7DDWD1jtFE8yeWw/3.79.28.0.9 
>> and related Webkit bug http://bugs.webkit.org/show_bug.cgi?id=18001 ), 
>> while for others 96 is only a floor (e.g. Gecko). IE uses whatever DPI 
>> has been specified for the desktop generally.

> No, it doesn't.

>    http://software.hixie.ch/utilities/js/live-dom-viewer/saved/161

Well, based upon that URL with its 1em div borders, and in part because DPI
generally implies a reference to device dots rather than CSS dots, I'm having
a hard time deciding whether that is true or not. It might be easier if those
divs were designed to render comparably regardless of browser personalities:

IE7, Gecko, Safari & Opera @ 120 DPI on XP:
http://fm.no-ip.com/SS/hixie161-IE7.png

Similar, with IE8: http://fm.no-ip.com/SS/hixie161-IE8.png

NAICT with IE8, px sizes are in CSS px [em]as adjusted according to the
desktop DPI setting[/em], following
http://www.w3.org/TR/CSS2/syndata.html#length-units, resulting in the same
width for both 96px and 1" width divs, more similar to the "a" divs in Gecko,
Opera & IE7 than their "b" divs.

Using http://fm.no-ip.com/auth/dpi-screen-window.html it's readily apparent
that all browsers except Safari render the 1" images the same width, even
though IE8 has scaled CSS px up by 25% via the 120 DPI desktop setting and
reports using 96 DPI where Gecko & Opera report the desktop setting.

> 96 CSS pixels and one inch are the same in IE8, regardless of the screen 
> resolution.

I hadn't yet installed IE8 on anything when I wrote what you replied to. So,
to recap, there are now 3 main behaviorally disguishable groups (among latest
official browser releases) on Windows:

1-IE8, via 4.3.2 spec uses desktop DPI setting to determine all px & absolute
sizing
2-Safari, always 96 DPI device px=CSS px regardless of system settings & hardware
3-pre-v8 IE, Gecko & (NAICT) Opera, which (below 192 DPI at least) in latest
versions still equate device px to CSS px, and floor DPI at 96 (no floor in IE)

Note that because the installed base of IE8 is much smaller than that of
earlier versions, "IE" behavior averages behavior equivalent to Gecko &
Opera. ;-)
-- 
No Jesus - No peace , Know Jesus -  Know Peace

 Team OS/2 ** Reg. Linux User #211409

Felix Miata  ***  http://fm.no-ip.com/



More information about the Help mailing list