Re: [css3-values] Unit normalization and types

2009/3/28 David Woolley <>:
> Giovanni Campagna wrote:
>> According to the current text, the only absolute units are cm, mm, pt,
>> in and pc.
>> Does this means that px units are converted to cm (or in if the
>> developer is British) in the Computed Values, then back to px in the
>> Actual Values?
>> What absolute unit should be chosen?
>> What is the meaning of converting px to cm, considering that the UA
>> has probably no knowlegde about the diagonal of my monitor?
> Pixels have been a confusing area for a long time.  Officially they actually
> represent a proportion of the screen (window?) and I believe that some
> browsers have even attempted to do that.  More rationally, though they are
> asymptotic to that for small physical pixels, but always a integral number
> of physical pixels, or integral fraction of one.
> For accessibility purposes, they should be treated as being absolute units,
> and therefore their use should be avoided.

This is not my concern, mine is about pixels as Computed Value. I
expect that cm are converted to px at the Actual Value time, and then
all lengths, in CSS pixels, are displayed using system metrics.
In addition, I don't see why a CSS pixel should always be a integral
number of physical pixels, assuming graphics libraries and hardware
that allow floating point pixels.

> It should always be possible for a user agent with real display to convert
> to cm, as the user agent cannot display cm correctly without knowing the
> physical pixel size.  What it knows may be wrong, and often is wrong on
> common GUI systems, although I believe both Windows and X have provision for
> proper calibration.  Obviously, any conversion to cm, on a browser, that
> maintains physical pixel integrity, needs to involve rounding to physical
> pixels before converting.

I ask the question again "how the UA *or the system* can convert
pixels to centimeters, since they have no knowledge about the diagonal
of my monitor?". Obviously the UA can just assume 1 in = 96 px = 2.54
cm and convert like that, but the meaning of lenght is distorted. Even
if the system knows the output resolution, it will not know the
scaling done by the monitor.

> I've ignored the issue of rectangular pixels that sometimes comes up when
> discussing the px unit.
> PS.  It might bave been better to address each sub-topic in a different
> article, as there is as risk that only one will get discussed.

My comment was not specifically on px units, but rather on all units.
I didn't want to pollute the mailing list with lots of different
threads, all about css3-values.

> --
> David Woolley
> Emails are not formal business letters, whatever businesses may want.
> RFC1855 says there should be an address here, but, in a world of spam,
> that is no longer good advice, as archive address hiding may not work.


Received on Saturday, 28 March 2009 13:32:13 UTC