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

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

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 29 Jun 2010 15:12:47 -0700
Message-ID: <4C2A6FDF.4040303@inkedblade.net>
To: "www-style@w3.org" <www-style@w3.org>
On 06/16/2010 06:32 PM, fantasai wrote:
> I was given an action item to write proposed wording for CSS2.1 Issue 149
> http://wiki.csswg.org/spec/css2.1#issue-149
> to define a fixed ratio of 4:3 for pt:px and to allow the physical value
> of these units to vary. Since it's a multimedia section and a complicated
> set of changes, I've posted the wording as HTML here:
> http://fantasai.inkedblade.net/style/specs/css2.1/px-unit

I've been thinking about this issue, and I've come to the conclusion that,
roc's original proposal to redefine points (and picas) but not the other
units makes more sense. Here are the arguments that have convinced me:

   - We do have use cases for real, physical units. Mozilla's team,
     for example, wants them for its mobile phone UIs.
   - Defining mm, cm, and in relative to px has rather unexpected
     effects on Media Queries: I can no longer query the physical
     dimensions of my screen or viewport, only its pixel grid size.
   - The point, as a unit, has only very recently been standardized
     and already suffers from multiple definitions:
       http://en.wikipedia.org/wiki/Point_%28typography%29

So here's an alternate proposal
   http://fantasai.inkedblade.net/style/specs/css2.1/pt-unit
that defines two groups of units:
   * px, pt, and pc as device-relative (based on CSS px)
   * in, mm, cm as physically-absolute

The two map together when either
   a) we're printing, in which case CSS points map to PostScript points or
   b) effective device resolution is unknown, in which case an inch maps
      to 96px

This addresses the use cases for real physical units, addresses the
web-compat problem with authors mixing points and pixels, and avoids
redefining the millimetre. Given that roc suspects it won't break
the Web, I'd rather go this route.

~fantasai
Received on Tuesday, 29 June 2010 22:13:23 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:28 GMT