Re: [css-device-adapt] Decoupling zoom and width/height

On Wed, 14 Nov 2012 10:27:58 +0100, Rune Lillesveen <rune@opera.com> wrote:

> For instance, if the UA stylesheet has max-zoom: 5, and the initial  
> width is 320px, <meta name="viewport" content="width=10"> will resolve  
> to 48px.

By my calculations this should say 64px, not 48px.

> For max-descriptors, ‘extend-to-zoom’ resolves as follows:
>
>   - If extend-zoom is ‘auto’, set max-width = ‘auto’ or max-height =  
> ‘auto’
>   - If extend-zoom is non-‘auto’, set max-width = extend-width or  
> max-height = extend-height.
>
> For min-descriptors, ‘extend-to-zoom’ resolves as follows:
>
>   - If extend-zoom is ‘auto’, set min-width = max-width or min-height =  
> max-height
>   - If extend-zoom is non-‘auto’, set min-width = MAX(extend-width,  
> max-width) or min-height = MAX(extend-height, max-height).

I was quite confused by this wording at first, it took a while to realize  
what was meant. I think it should be more explicit about the width vs  
height cases, and make it clearer that everything is just about resolving  
the keyword and not just straight assignments to min/max-width/height. So,  
for instance...

*********
The ‘extend-to-zoom’ keyword is resolved as follows:

- If given as a value for max-width, resolve to ‘auto’ if extend-zoom is  
‘auto’, otherwise resolve to extend-width.
- If given as a value for max-height, resolve to ‘auto’ if extend-zoom is  
‘auto’, otherwise resolve to extend-height.
- If given as a value for min-width, resolve to max-width if extend-zoom  
is ‘auto’, otherwise resolve to MAX(extend-width, max-width).
- If given as a value for min-height, resolve to max-height if extend-zoom  
is ‘auto’, otherwise resolve to MAX(extend-height, max-height).
*********

Or...

*********
If extend-zoom is ‘auto’:

1. If max-width is ‘extend-to-zoom’, set max-width = ‘auto’.
2. If max-height is ‘extend-to-zoom’, set max-height = ‘auto’.
3. If min-width is ‘extend-to-zoom’, set min-width = max-width.
4. If min-height is ‘extend-to-zoom’, set min-height = max-height.

If extend-zoom is non-‘auto’:

1. If max-width is ‘extend-to-zoom’, set max-width = extend-width.
2. If max-height is ‘extend-to-zoom’, set max-height = extend-height.
3. If min-width is ‘extend-to-zoom’, set min-width = MAX(extend-width,  
max-width).
4. If min-height is ‘extend-to-zoom’, set min-height = MAX(extend-height,  
max-height).
*********

-- 
Øyvind Stenhaug
Opera Software ASA

Received on Wednesday, 14 November 2012 15:10:12 UTC