Re: CSS Viewport proposal

Is "target-densitydpi: device-dpi" supported in iOS?
Android worked out well for me, but working on the iPhone 4, I hit a wall.


On 8/9/2010 10:02 AM, Kenneth Christiansen wrote:
> Basically the ratio is calculated, and the default DPI is considered
> to be 160 which I guess is the DPI on the first iPhone and Android
> devices.
>
> With a DPI of 160 no scaling is needed. On the other hand if you have
> a device such as the newer Android devices or the Nokia N900, if no
> DPI is set, a scale of 1.5 is applied (Fennec does this on the N900 as
> well), due to the DPI of the device being 240.
>
> This is reflected via the -webkit-device-pixel-ratio media feature.
>
> Instead of doing the scaling, the web developer can set
> target-densitydpi to device-dpi (240 in the above case) in which no
> scale is applied. This means that a initial-scale of 1.0 is actually
> 1.0 and not 1.5 as if the target-densitydpi was left out.
>
> The list of options for target-densitydpi are as follows (copied from
> Android changelog):
>
> device-dpi:    Use the device's native dpi as target dpi.
> low-dpi:       120dpi
> medium-dpi:    160dpi, which is also the default as of today
> high-dpi:      240dpi
> <number>:      We take any number between 70 and 400 as a valid target dpi.
>
> Cheers,
> Kenneth
>
>    
>>> You should also consider adding the Android targetdpi extension.
>>>        
>> Perhaps. So how would you go about using that? In combination with the
>> resolution media feature?
>>
>> I kind of see the point of using physical pixels for the intrinsic size of
>> images.
>>
>> Will people complain about breaking with the specification of a CSS pixel?
>>
>> --
>> Rune Lillesveen
>> Senior Core Developer / Architect
>> Opera Software ASA
>>
>>      
>
>
>    

Received on Monday, 9 August 2010 17:08:45 UTC