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

Re: [css3-images][css4-images] Replace 'dppx' with 'x'?

From: Simon Fraser <smfr@me.com>
Date: Thu, 14 Jun 2012 11:25:27 -0700
Cc: Florian Rivoal <florianr@opera.com>, www-style@w3.org
Message-id: <C6FA16AB-81EE-4C72-A88C-1304393F1DD5@me.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
On May 29, 2012, at 4:22 PM, Tab Atkins Jr. wrote:

> On Tue, May 29, 2012 at 1:08 AM, Florian Rivoal <florianr@opera.com> wrote:
>> On Fri, 25 May 2012 20:07:53 +0200, Christoph Päper
>> <christoph.paeper@crissov.de> wrote:
>>> Of course, all the reciprocal length units are plain stupid and
>>> unnecessary – and always have been.
>>>  image-resolution: <count> [ / <length> ]?;
>>>  image-resolution: 1dot; /* with 1px default */
>>>  image-resolution: 300dot/1in;
>>>  image-resolution: 100dot / 1mm;
>> I wasn't there when you initially suggested that, but I think I like it. It
>> may be too late to introduce something like that, but I wouldn't mind being
>> proven wrong about this.
> The 'image-resolution' property was reverse-implemented based on what
> already existed, so we can't remove what exists, but we can always add
> more syntax later.  However, I don't think adding ratios for
> expressing resolution is a good thing unless we do it everywhere.

My problem with the dppx unit is that the ratio of device pixels to CSS pixels only makes
sense when the page is unscaled. Most mobile devices (and, increasingly, desktop browsers)
present pages at a non-unit scale, and allow users to zoom the page in and out. When zoomed,
there's an additional scale factor applied that needs to be taken into account in the relationship
between device pixels and CSS pixels. The 'dppx' unit pretends that such a scale factor does not
exist, which is confusing.

In addition, I still think that most authors will interpret "resolution" in terms of physical screen size,
not the 1:96 fixed CSS inch:pixel ratio.

Both are strong arguments for a simple multiplier factor in media queries, as used by device-pixel-ratio.

Received on Thursday, 14 June 2012 18:25:58 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:00 UTC