W3C home > Mailing lists > Public > www-style@w3.org > June 2010

Re: [CSS21] Issue 149 - px vs. pt

From: Brad Kemper <brad.kemper@gmail.com>
Date: Tue, 29 Jun 2010 09:33:40 -0700
Cc: David Singer <singer@apple.com>, "www-style@w3.org" <www-style@w3.org>
Message-Id: <86F1CC4B-87A6-4EFF-BCEA-484832229F47@gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>

On Jun 28, 2010, at 10:32 PM, fantasai wrote:

> On 06/17/2010 01:06 PM, fantasai wrote:
>> Ok, here's the new paragraph:
>> | For a CSS device, these dimensions are either anchored (i) by
>> | relating the physical units to their physical measurements, or
>> | (ii) by relating the pixel unit to the <i>reference pixel</i>.
>> | For print media and similar high-resolution devices, the anchor
>> | unit should be one of the standard physical units (inches,
>> | centimeters, etc). For lower-resolution devices, and devices
>> | with unusual viewing distances, it is recommended instead that
>> | the anchor unit be the pixel unit. For such devices it is
>> | recommended that the pixel unit refer to the whole number of
>> | device pixels that best approximates the reference pixel.
> David Singer pointed out that it would help to point out
> that the new definition means px units might not map to
> an integer number of device pixels, so I've added the
> following two notes after this paragraph:
> | <p class="note"Note that if the anchor unit is the pixel unit,
> | the physical units might not match their physical measurements.
> | Alternatively if the anchor unit is a physical unit, the pixel
> | unit might not map to a whole number of device pixels.
> |
> | <p class="note">Note that this definition of the pixel unit and
> | the physical units differs from previous versions of CSS. In
> | particular, in previous versions of CSS the pixel unit and the
> | physical units were not related by a fixed ratio: the physical
> | units were always tied to their physical measurements while the
> | pixel unit would vary to most closely match the reference pixel.
> | (This change was made because too much existing content relies
> | on the assumption of 96dpi, and breaking that assumption breaks
> | the content.)

Hmm. I had begun thinking of the px unit as more or less being equal to 1/96 of a physical inch, rounded to the nearest physical pixel, and then a CSS inch is 96 of those (not including scaling & zooming). Are there cases other than downscaling (aka zooming out) in which the px would not round to pixel? In high res printing, I would think it would be pretty natural to round to the pixel, even more so than on monitors. Maybe we can just say that when downscaling, if the anchor unit is a physical unit the px may not round to a physical pixel.

Or is it the case that even though the print device may print binary dots with no anti-aliasing, that the px may still be a floating point number of physical pixels (even at 100% scale), so that the print can still be accurate over larger distances?
Received on Tuesday, 29 June 2010 16:34:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:47 UTC