W3C home > Mailing lists > Public > www-style@w3.org > March 2013

Re: [css-device-adapt] @viewport vs. Media Queries.

From: Rune Lillesveen <rune@opera.com>
Date: Fri, 01 Mar 2013 09:51:24 +0100
To: "www-style@w3.org" <www-style@w3.org>, "Simon Sapin" <simon.sapin@kozea.fr>
Message-ID: <op.ws9evyg08isf1p@id-c1005.oslo.osa>
On Thu, 28 Feb 2013 13:06:24 +0100, Simon Sapin <simon.sapin@kozea.fr>  
wrote:

> Hi,
>
> Section 7 on css-device-adapt describes how @viewport rules interact  
> with Media Queries, which may be based on the viewport size.
>
> Three comments:
>
>
> 1.
>
> Editorial: This section uses the word "recommended". It is fine when  
> addressed to authors, but the meaning is unclear when addressed at  
> implementation. Does it make the sentence non-normative? I suggest  
> either:
> * If it’s a normative requirement, use "must" or general statements like  
> "This is what happens."
> * If it’s not, move to a note or have something like "This section is  
> non-normative."

I'm fine with making it a "must".

> 2.
>
> Next is described hot to apply @viewport rules first, then style rules.  
> This needs to mention every other at-rule. I think the intended behavior  
> is:
>
> 1. Apply @import rules, conditional rules (including @media) and  
> @viewport rules. Media queries are based on the initial viewport.
> 2. Apply all rules but @viewport. Conditionals are resolved again with  
> MQs based on the actual viewport.

This was written before Conditionals (reading it a second time, it seems  
you mean everything relying on viewport size). I'd prefer a wording that  
is more forward compatible with future specs and @-rules.

How about:

1. Cascade all @viewport rules using the initial viewport size for values  
and evaluations which rely on viewport size.
2. Compute the actual viewport from the cascaded viewport descriptors.
3. Cascade all other properties and descriptors using the actual viewport  
size.

> 3.
>
> At the end of the section: "The next example illustrates possible  
> circular dependencies […] If the media queries were based on the actual  
> viewport […]"
>
> This is a justification of why the spec is written as it is, by showing  
> that the other behavior would not make sense, right? It’s a bit  
> confusing to describe a behavior that is not the one specified. This  
> example needs a big warning.

Yes, it's a justification.

I'd prefer to just remove the last paragraph + example instead.

-- 
Rune Lillesveen
Received on Friday, 1 March 2013 08:51:55 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:06 GMT