Re: Making pt a non-physical unit

> On Sat, Jan 16, 2010 at 5:07 PM, Giuseppe Bilotta
>>
>> This is precisely why I wanted to give the designers the possibility
>> to choose the 'expected' ratio between CSS and real units, some way to
>> say "make 1px equal to one device pixel" vs "make 1in equal to one
>> real world inch".
>>
>> (This could be pushed as far as allowing the designer to define new
>> units, but this is most definitely out of scope for this discussion.)

On Sun, Jan 17, 2010 at 1:19 AM, Brendan Kenny <bckenny@gmail.com> wrote:
>
> It seems like the unfortunate legacy here will be a bunch of units
> with names that correspond to units in other media (e.g. a meter
> stick) but have only a historical connection to them. While "pixel" is
> certainly the correct nomenclature, "CSS pixel" already causes and
> will continue to cause confusion in designers reading the specs.

You almost make it sound like a dramatically bad thing. I'm not
particularly happy with the situation, but overall the only unit
that's getting detached from its 'runtime' real world significance is
the px. Everything else is just one scaling factor away from the
reality it derived from, which is not so bad.

> But I think there is a strong argument to having access to a "device
> pixel" (or "hairline," etc) as an *independent* system of measurement.
> Certainly it can be a tool for users to shoot themselves in the foot
> (e.g. font-size in device pixels), but even in a
> resolution-independent world there are still effects where it is
> advantageous to be able to specify values to the device pixel.

One would hope that with the introduction of a _new_ unit, designers,
not being tutored by legacy, wouldn't start using it in the _wrong_
way. (Also, hopefully one particular major browsers would lag a lot in
the adoption of the new unit, so that designers that use them would
test its use with tools that implement the standards correctly ;-)).

> Of course, there is still a gotcha. On a high-dpi display, with a
> (typically) fixed CSS-pixel to device-pixel ratio, having access to
> the device pixel is advantageous and useful in the ways mentioned.
> But, for example, on a mobile browser displaying a non-mobile page
> that ratio is meaningless. There could certainly be a manufacturer
> specified ratio and a well defined "zoom: 1", but in that situation,
> really, the ratio is whatever the user of the browser decides is best
> for the content they're viewing and is probably changing continuously.
> But I'm sure there are people here that have thought about that
> problem quite a bit (does mobile Safari expose zoom events?).

Let us say that this new unit is 'vp' (Viewing device Pixel). Since
this unit would have rather specific application cases (hairlines,
pixel-by-pixel image manipulation and similar things), I'm wondering
if this should be some kind of 'fixed absolute' unit, in the sense of
being independent of scaling/zooming? I get the impression, reading
the CSS3 spec, that vw/vh/vm units could be considered scaling/zooming
independent, and if this is the case the same would hold for vp.

[BTW, bug in http://www.w3.org/TR/css3-values/ "If the width of the
viewport is 200mm, the font size of h1 elements will be 16mm
((8×200)/100). When the width of the viewport is changed (for example,
when the browser window is enlarged), lengths specifed in the 'vh'
unit is scaled propertionally." <- the 'vh' should be a 'vw']




-- 
Giuseppe "Oblomov" Bilotta

Received on Sunday, 17 January 2010 08:11:10 UTC