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

Re: [css-device-adaptation] Possible Example error?

From: Andrea Rendine <master.skywalker.88@gmail.com>
Date: Mon, 13 Apr 2015 12:31:40 +0200
Message-ID: <CAGxST9mi8jYeUS=3t8Q+VREYa291oTkUEef2jASQEMhYCpd6NA@mail.gmail.com>
To: Rune Lillesveen <rune@opera.com>
Cc: www-style list <www-style@w3.org>
Yes, it became clear in another thread.
Thank you!

2015-04-13 11:57 GMT+02:00 Rune Lillesveen <rune@opera.com>:
> On Sun, Apr 5, 2015 at 5:57 AM, Andrea Rendine
> <master.skywalker.88@gmail.com> wrote:
>> 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?
>
> The example is correct as it stands.
>
> --
> Rune Lillesveen
Received on Monday, 13 April 2015 10:32:06 UTC

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