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

Re: Making pt a non-physical unit

From: Jonathan Kew <jonathan@jfkew.plus.com>
Date: Thu, 14 Jan 2010 11:09:06 +0000
Message-Id: <30E2DD2D-A9D6-4F92-B0C9-80C2BA9BFB47@jfkew.plus.com>
To: www-style <www-style@w3.org>
On 14 Jan 2010, at 10:21, Robert O'Callahan wrote:

> Let me recapitulate...
> 
> How about the following definition for CSS pixel:
> For print media intended to be read "at hand", a CSS pixel should be rendered as 1/96 of an inch. For all other media, including print media not intended to be read at hand, e.g., billboards, the user agent should size a CSS pixel so that it subtends a angle to the eye approximately equal to 1/96 of an inch at arms length; however, the user agent may take into account user-agent-specific constraints such as display technology, user preferences, and consistency with other applications on the same device.
> 
> Then we can define the CSS absolute length units:
> 1in == 96px
> 1pt == 4/3px
> 1pc == 16px
> 1cm == 96/2.54px
> 1mm = 96/25.4px

This seems reasonable to me.

> 
> Define "truemm":
> "truemm" is defined to correspond to physical millimeters in all media. For extremely small or large output surfaces, or when the physical media characteristics are unknown, the user agent may use an approximation.

While I don't specifically object to this, I'm still not entirely convinced we need it at all. Thinking about the suggested use-cases...

Touch interfaces: it seems to me that a touch-screen interface will in practice be designed specifically for a (fairly narrow range of) physical devices with known characteristics, and as such it could be done using the normal CSS units. If you design an interface for a cellphone screen, with a number of touch-sensitive UI elements (that need to be around 6mm high, let's say), and then move that application to a device with a screen twice the size, will it really make sense to use the same collection of interface elements at the exact same size as on the little phone? I doubt it.

Thinking of devices I've used personally, my expectations for a "reasonable" button size on an iPhone screen is VERY different from a "reasonable" size for a functionally equivalent button on an airport check-in kiosk. And if I had a "full-size" tablet computer with a touch-screen interface, I wouldn't want the UI elements to remain the same physical size as they are on my iPod Touch. In general, I'd expect interfaces to be extensively redesigned for the different device sizes, but even if the same interface layout is used, I still don't think the actual element sizes should be fixed.

For an application (such as a mobile/touch version of Firefox, for example) that is intended to be usable across quite a wide range of device sizes, I'd expect it to make most sense to design several versions of the user interface, optimized (not just in terms of dimensions, but also the overall layout, number of controls presented at once, etc) for different screen sizes. There might be a "small-phone UI", a "PDA UI", and a "tablet UI", and the application would either be built separately for different target devices, or use some kind of media-query to determine at runtime which to use. Within the range of "small phones", for example, a certain amount of variation in the UI element sizes according to the exact size of the screen seems perfectly natural and acceptable, IMO. People with really tiny screens surely expect tinier buttons; people with somewhat larger screens expect them to be easier to hit.

And as for "life-size diagrams", it's difficult to think of many realistic uses for this. If I'm reading a medical textbook on paper, a life-size drawing of the anatomy of the human hand might make sense, for instance. This still works if I'm reading it on my laptop - but if I read that same textbook on an iPhone, it's not much use. I'm much better served by a scalable drawing, with a "6-inch" ruler (also scaled, of course!) beside it indicating the actual size. In the unlikely event that I really, truly want to see the life-size bones on the phone, I'll need to zoom the display so that the ruler becomes physically accurate.... but I'm not convinced this is what people want or expect.

For the laptop screen, where viewing the diagram at life size may indeed make sense, it could be the user agent's job to offer an "actual size" viewing option that renders 1px as 1/96 of a physical inch, if this is not its default - in other words, an option to scale the display in the same way as a printed version of the page. So no special CSS unit is required; the page is designed "for print", and a user who wants to see "true" dimensions simply asks the UA to display at "actual size". (And if the UA doesn't have the information needed to support this, then it also doesn't have the information to implement "truemm" accurately.)

In summary, IF we need this concept of "truly physical" units, distinct from the normal CSS units that adapt to radically differing device sizes, then "truemm" or something like that seems like the best way to do it; I'm just not sure we really need it at all. (But then, I'm not a designer......!)

JK
Received on Thursday, 14 January 2010 11:09:55 GMT

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