Re: CSS Viewport proposal

On Tue, 17 Aug 2010 13:54:27 +0200, Kenneth Rohde Christiansen  
<kenneth.christiansen@gmail.com> wrote:

> Hi Rune,
>
> This seems wrong:
>
> 11. If the computed value of initial-scale is ‘auto’ and height is not
> ‘auto’, set initial-scale = MAX(initial-scale, (available-height /
> height))
>
> How can you do max of something that is auto.

As pointed out by Øyvind, it's defined in 6.1.

> I use the following in my code:
> appliedScale = qMax(qreal(visibleWidth) / qreal(appliedWidth),
> qreal(visibleHeight) / qreal(appliedHeight));

As long as both appliedWidth and appliedHeight are calculated at that  
point. In the spec, they might be 'auto' at the point where the  
initial-scale is resolved.

-- 
Rune Lillesveen
Senior Core Developer / Architect
Opera Software ASA

Received on Tuesday, 24 August 2010 19:50:23 UTC