Re: CSS Viewport proposal

On Mon, 09 Aug 2010 17:00:02 +0200, Kenneth Christiansen  
<kenneth.christiansen@openbossa.org> wrote:

> Hi there,
>
> Isn't the point in it being a meta tag that you know about the
> viewport before you do the first layout of the contents? Having it in
> CSS means that everyone can specify the viewport at different points
> in time and change it during runtime, like on rotation. Currently the
> viewport meta tag assumed portrait mode.

In Safari, viewport META elements are recognized in other parts of the  
document too. They can even be inserted into the dom after the document  
has finished loading and taken into account.

Putting @viewport style in <head> would be recommended practice, but I  
don't think it should be an implementation issue. It's similar to changing  
the viewport by resizing the window in a desktop browser, which could  
happen at any time.

> height	auto | device-width | device-height | desktop-width | <length>
> | <percentage>
>
> I think there is an error in the above, as desktop-width probably
> should be desktop-height.

It is intentional. I did not add a desktop-height value. The height is  
inferred from the scale and width properties when using desktop-width. The  
reason why desktop-width is allowed as a height value, is that  
device-width can be used for height (in Safari viewport meta) and vice  
versa.

> 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 16:51:48 UTC