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

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

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Thu, 28 Feb 2013 13:06:24 +0100
Message-ID: <512F4840.3030501@kozea.fr>
To: "www-style@w3.org" <www-style@w3.org>

Section 7 on css-device-adapt describes how @viewport rules interact 
with Media Queries, which may be based on the viewport size.

Three comments:


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 


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.


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.

Simon Sapin
Received on Thursday, 28 February 2013 12:06:50 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:26 UTC