W3C home > Mailing lists > Public > www-style@w3.org > May 2011

Re: [css3-images] Is the dppx unit needed?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 24 May 2011 09:46:32 -0700
Message-ID: <BANLkTinf8y08vyuVRSU=6=Sj7mFSJsmFGQ@mail.gmail.com>
To: Brad Kemper <brad.kemper@gmail.com>
Cc: Sylvain Galineau <sylvaing@microsoft.com>, www-style list <www-style@w3.org>
On Tue, May 24, 2011 at 9:29 AM, Brad Kemper <brad.kemper@gmail.com> wrote:
> On May 24, 2011, at 8:52 AM, Tab Atkins Jr. wrote:
>> On Tue, May 24, 2011 at 7:40 AM, Sylvain Galineau
>> <sylvaing@microsoft.com> wrote:
>>> [Brad Kemper:]
>>>> On May 23, 2011, at 8:30 PM, Sylvain Galineau wrote:
>>>>> [Tab Atkins:]
>>>>>> I'm rewriting the section on the <resolution> type in the Images spec
>>>>>> <http://dev.w3.org/csswg/css3-images/#resolution-units> to actually
>>>>>> explain what the unit does right now.  While writing an example, I
>>>>>> was struck by the fact that the dppx unit seems unnecessary, given
>>>>>> that we now have a guaranteed 96:1 ratio of 'px' per 'in'.
>>>>>>
>>>>>> Everything I know of that talks about image resolution uses dpi or
>>>>>> dpcm only.  I don't think I've ever seen anything equivalent to dppx.
>>>>>> Plus, 'dppx' is a hard unit to pronounce.  ^_^
>>>>>>
>>>>>> I suspect that dppx was created back when we couldn't actually say
>>>>>> that images were 96dpi by default, because the CSS 'in' wasn't tied
>>>>>> to a specific number of CSS 'px'.  Could I just drop it, and set the
>>>>>> initial value of 'image-resolution' to 96dpi?
>>>>>>
>>>>>> ~TJ
>>>>> I was going to ask as the dppx unit seemed to be a way to redefine CSS
>>>> pixels.
>>>>> What was(were) the use-case(s) ?
>>>>
>>>> DPI and its metric cousin are good enough for me. I suppose that since
>>>> dppx = dpi/96, someone maybe would want a non-fractional result, in which
>>>> case dppx could make that easier to pick the right number. But I don't
>>>> think that it is too big a deal to just do the math in that case and pick
>>>> something suitable.
>>>
>>> If that was a use-case I don't understand any of it.
>>
>> I believe it's an explanation of why he doesn't think dppx is necessary.  ^_^
>
> Pretty much. The weak use case was all I could think of. That being, if you want an integer number of image pixels per px (for sharper results), then it would be easier to say '2dppx' or '3dppx' than to multiply by 96 for dpi.
>
> In your image() function you have 'snap' to fulfill a similar (perhaps not identical) purpose.

Basically the same purpose.  "300dpi snap" should resolve into 288dpi,
so you get an even 3 image pixels per CSS px.

~TJ
Received on Tuesday, 24 May 2011 16:47:19 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:40 GMT