W3C home > Mailing lists > Public > public-css-testsuite@w3.org > September 2006

RE: pixel-based vs. real-word-pased units

From: Peter Sorotokin <psorotok@adobe.com>
Date: Mon, 11 Sep 2006 15:49:55 -0700
Message-ID: <40CE68F1F8CAFB48B998C328517EA92AF43B5C@namail2.corp.adobe.com>
To: "Ian Hickson" <ian@hixie.ch>
Cc: <public-css-testsuite@w3.org>

Ian, I do not see how that is the case with the current language in the
spec. The current draft of CSS2.1 spec says:

Pixel units are relative to the resolution of the viewing device, i.e.,
most often a computer display. If the pixel density of the output device
is very different from that of a typical computer display, the user
agent should rescale pixel values. It is recommended that the reference
pixel be the visual angle of one pixel on a device with a pixel density
of 96dpi and a distance from the reader of an arm's length. For a
nominal arm's length of 28 inches, the visual angle is therefore about
0.0213 degrees.

[ http://www.w3.org/TR/CSS21/syndata.html#length-units ]

My laptop's screen is about 115dpi (which is quite typical for a
computer display, I'd say), so user agent should not rescale pixel
values in my case (I can imagine once it gets to 160, 1 CSS pixel would
be equal to two display pixels).

If CSS spec meant to say that 96px is *always* equal to 1inch (or that
1inch is always equal to 96 pixels which seems like the more common
definition of an inch in today's browsers) it should have just said that
instead of going through the complex explanations about arm length and
so on. If it did not mean to say that, test suits should not be written
with that assumption.

Peter

-----Original Message-----
From: ian.hickson@gmail.com [mailto:ian.hickson@gmail.com] On Behalf Of
Ian Hickson
Sent: Monday, September 11, 2006 3:28 PM
To: Peter Sorotokin
Cc: public-css-testsuite@w3.org
Subject: Re: pixel-based vs. real-word-pased units

On 9/11/06, Peter Sorotokin <psorotok@adobe.com> wrote:
>
> Some tests seem to assume that 96px = 1in (e.g.
>
http://www.w3.org/Style/CSS/Test/CSS2.1/current/t0803-c5501-mrgn-t-00-b-
a.xht).
>
> Isn't that wrong assumption?

Not for anything whose screen is at arm's length from the viewer's
eyes, no. (It _is_ technically incorrect for projection screens, but
in practice if a projection screen rendered 1in as a real inch -- say,
10px -- it would break a lot of existing content, so projection media
UAs usually treat "1in" as being a relative unit and not a physical
one. I expect in a few years we'll end up redefining the absolute
units to take this into account.)

-- 
Ian Hickson
Received on Monday, 11 September 2006 22:50:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 20 September 2010 17:51:54 GMT