Re: CSS Viewport proposal

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.

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

Cheers,
Kenneth

On Thu, Aug 12, 2010 at 3:55 AM, Rune Lillesveen <rune@opera.com> wrote:
> On Thu, 12 Aug 2010 01:42:53 +0200, Kenneth Rohde Christiansen
> <kenneth.christiansen@gmail.com> wrote:
>
>> Strange, maybe this changed between versions. Do you get overflow on
>> www.uol.com.br then? like 10 pixels in width?
>
> I get 988 for window.innerWidth for uol.com.br. The problem with my simple
> cases was that they didn't have enough height.
>
> In Safari, this case sets a scale factor that fits 980px in the viewport for
> the width:
>
>  <div style="width: 4000px; height: 10px; background: green;"></div>
>
> while this gives 1280px (limited by default minimum-scale of 0.25 - 320/0.25
> = 1280)
>
>  <div style="width: 4000px; height: 4000px; background: green;"></div>
>
>> On Wed, Aug 11, 2010 at 3:40 PM, Rune Lillesveen <rune@opera.com> wrote:
>>>
>>> On Mon, 09 Aug 2010 17:50:43 +0200, Kenneth Christiansen
>>> <kenneth.christiansen@openbossa.org> wrote:
>>>
>>>> Hi again,
>>>>
>>>> You seem to be missing the fit-to-contents part. Try opening
>>>> www.uol.com.br on the iPhone. As it has no viewport tag, 980 is
>>>> assumed as the layout width, but as the contents is 990 in width, the
>>>> iPhone actually modifies the scale value to fit to contents.
>>>
>>> I'm not able to get much sense out of this. It's not modifying the scale
>>> value to fit the contents in the simple cases for overflowing the initial
>>> containing block that I've tried.
>
> --
> Rune Lillesveen
> Senior Core Developer / Architect
> Opera Software ASA
>



-- 
Kenneth Rohde Christiansen
Technical Lead / Senior Software Engineer
Qt Labs Americas, Nokia Technology Institute, INdT
Phone  +55 81 8895 6002 / E-mail kenneth.christiansen at openbossa.org

http://codeposts.blogspot.com ﹆﹆﹆

Received on Tuesday, 17 August 2010 11:55:14 UTC