On Thu, 09 Aug 2012 11:29:17 +0200, Kornel Lesiński <kor...@geekhood.net> wrote:

On 8 sie 2012, at 12:57, "Florian Rivoal" <flori...@opera.com> wrote:

Is there a good reason to believe that * will be something other than a
power of two?

That is, could we just optimize the *x syntax away and specify that the
first option is 1x, the second is 2x, the third is 4x, etc.?

If you look at mobile phones, there are a bunch of existing devices with
1.5 device pixel per css pixel, and also some with 2.25, so I don't
think we can assume only powers of 2 will be used.

Pixel-perfect design for non-integer scaling ratios is very hard. To have evenly thin lines (1 device pixel wide) on such screens you have to use fractional CSS pixel sizes, and fractions need to be different for different scaling ratios.

I don't think anybody will take advantage of that. IMHO non-integer ratios are a mistake that can/will be corrected.

I wasn't debating whether or not shipping a device with a 1.5 pixel
ratio is the best decision, but answering: "Is there a good reason
to believe that will be something other than a power of two?"

The fact that it has happened seems a pretty good reason to believe
that it may happen.

Fractional ratios have proven to be unnecessary: on desktops 1x CSS pixel changed from 72dpi (CRT) to 130dpi on notebook screens, but we haven't got fractional scaling ratios along the way. Variability in screen sizes and actual DPI has been accepted. The same can happen with 1.5x-2.5x screens: pretend they all are 2x, vary CSS pixel width/height, accept physical size of CSS pixel will be slightly different.

For example the 2.25 ratio doesn't make sense to me. 12.5% increase in screen density is going to be imperceptible. A better solution would be to use the crisp 2x ratio and have bigger screen area (in CSS pixels).

A ratio of 2.25 on 720 physical pixel device gives a viewport width of 320
css pixels. 320 pixels is the same as the iPhone, and being identical to
that helps with site compatibility.

I am not convinced that using 2.25 was the best decision, but it has
some justifications, and has happened, so I don't think it is reasonable
to bake in some assumptions in the spec (only powers of 2) when we
know that they don't match reality.

 - Florian

Reply via email to