W3C home > Mailing lists > Public > www-style@w3.org > April 2015

[css-device-adaptation] Possible Example error?

From: Andrea Rendine <master.skywalker.88@gmail.com>
Date: Sun, 5 Apr 2015 05:57:32 +0200
Message-ID: <CAGxST9mFSL28jD7AkrcgqMVFkoqtSRk+eFdQ3MUUhZu0-PhPAg@mail.gmail.com>
To: www-style list <www-style@w3.org>
Example V:
The green color should be applied to a div because the initial viewport
width is used to evaluate the media query for the second @viewport rule,
but the actual viewport is used for evaluating the media query when
applying style rules.
@viewport {
  width: 397px;
}

@media screen and (width: 397px) {
  @viewport {
    width: 500px;
  }
}

@media screen and (width: 397px) {
  div { color: green; }
}

Shouldn't the last instruction be
@media screen and (width: 500px) {
  div { color: green; }
}

in order to show how different viewport apply to different situations, as
stated by the example introduction?
@viewport sets initial width to 397px > first media query is evaluated >
viewport width is set to 500px > second media query is evaluated according
to actual value

Is that correct?
Received on Sunday, 5 April 2015 03:57:59 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:30 UTC