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

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.

Simon
 

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