W3C home > Mailing lists > Public > www-style@w3.org > March 2013

Re: [css3-values] recommendation for pixel units

From: James Holderness <j4_james@hotmail.com>
Date: Wed, 20 Mar 2013 21:32:22 +0000
Message-ID: <BLU0-SMTP131CBF062E398FABEEFCD1DBEEA0@phx.gbl>
To: "Simon Sapin" <simon.sapin@exyr.org>
CC: "www-style" <www-style@w3.org>
> Spec text:
>> For such devices it is recommended that the pixel unit refer to the
>> whole number of device pixels that best approximates the reference
>> pixel.
>
> I think that the intent of this sentence is:
>
> 1. It is recommended to approximate the reference pixel
> 2. It is acceptable to deviate, for example if an integer ratio (or a 
> multiple of 0.25) makes implementation easier or gives better visual 
> results or for whatever reason. Viewing distances on a given display vary 
> anyway.

I'm not sure I follow your reasoning. You've got to make some choice of 
values when making these calculations. So for some reasonable viewing 
distance, you're going to calculate the reference pixel size, let's call 
that R; then given a device pixel size of P, the ideal number of device 
pixels per reference pixel will be R/P.

Now R/P could be anything, but it's unlikely to be a whole number. The spec 
recommendation then is to choose "the whole number of device pixels that 
best approximates the reference pixel". But that can surely only be 1, 2, 3, 
etc. Not 1.5 or 0.75.

Do you disagree that the spec text is recommending a whole number, or do you 
just think it doesn't matter if implementations ignore the recommendation 
and pick a multiple of 0.25 instead? (Or whatever - the Nexus 7 
device-pixel-ratio isn't even a multiple of 0.25)

I understand that a recommendation is not a requirement. I just don't 
understand the reason for having the recommendation if nobody thinks it's a 
good idea.

Regards
James
Received on Wednesday, 20 March 2013 21:32:49 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:07 GMT