Re: [css-device-adapt] How should initial viewport contribute to layout?

Thanks for your replies that made things clearer.


> > - sizeof(visual viewport) == sizeof(initial viewport) / pinch-scale.
> >   i.e. visual viewport == initial viewport if not pinch-zoomed.
>
> This one should be:
> sizeof(visual viewport) == sizeof(actual viewport) / pinch-scale.
>
> ...with the caveats mentioned earlier on the thread regarding other
> factors that can change the visual viewport (i.e. overlay UI).


I found I should have used 'page-scale' instead of 'pinch-scale' to make my
equation correct (page-scale = initial-scale * pinch-scale):
  sizeof(visual viewport) == sizeof(initial viewport) / page-scale

The modified equation seems still correct when actual viewport and initial
viewport has different aspect-ratios:
  @viewport { width: 480px; height: 480px }, window size is 240x320px, then
   - initial viewport: 240x320px
   - actual viewport: 480x480px
   - initial scale: 0.5
   - visual viewport: 480x640px

Received on Wednesday, 12 February 2014 23:36:36 UTC