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

RE: [css-device-adapt] Bad way to solve circular dependency

From: Matt Rakow <marakow@microsoft.com>
Date: Fri, 10 Apr 2015 01:49:12 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>, "L. David Baron" <dbaron@dbaron.org>
CC: Andrea Rendine <master.skywalker.88@gmail.com>, www-style list <www-style@w3.org>, Florian Rivoal <florian@rivoal.net>
Message-ID: <BY2PR03MB3618A2F2DED7B46AB8584B9ADFA0@BY2PR03MB361.namprd03.prod.outlook.com>
>-----Original Message-----
>From: Tab Atkins Jr. [mailto:jackalmage@gmail.com] 
>Sent: Thursday, April 9, 2015 6:30 PM
>To: Matt Rakow
>Cc: Andrea Rendine; www-style list; Florian Rivoal
>Subject: Re: [css-device-adapt] Bad way to solve circular dependency
>
>[please don't top-post]
>
>On Thu, Apr 9, 2015 at 5:07 PM, Matt Rakow <marakow@microsoft.com> wrote:
>> Although the usage of braces for @media rules implies grouping, in IE at least that is not the case - your two examples are treated as functionally identical.  So if the initial viewport is 397px wide then the actual viewport is 500px wide and the text is not green.  For other initial viewport widths, the actual viewport will be the width of the initial viewport and the text will be green.
>>
>> I was hoping there was some specification in the Media Queries spec regarding whether rules within @media must be applied as a group, but didn't find anything.
>
>What does "applied as a group" mean?  CSS doesn't have any notion of temporal application; all properties that apply do so together.
>
>> In fact I didn't see anything specifying the application of rules within @media.  I was expecting something along the lines of "the rules within an @media block are applied if and only if its media query list evaluates to true" -- am I missing the applicable text?
>
>The Media Queries spec is more widely applicable than CSS; MQ doesn't define the @media rule at all, just the notion of "media query".
>Conditional defines @media:
><http://dev.w3.org/csswg/css-conditional/#at-media>.
>
>~TJ
>


Thanks, I think this is approximately the language I was looking for regarding application as a group: "When the condition is true, CSS processors must apply the rules inside the group rule as though they were at the group rule’s location" [1].  I think this is the statement that either needs to be clarified for the device-adaptation case, or else device-adaptation needs more restrictive usage (e.g. can't be used in the same @media block as style rules).

Thanks,
-Matt

[1] http://dev.w3.org/csswg/css-conditional/#processing

Received on Friday, 10 April 2015 01:49:41 UTC

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