8000 [css-cascade] Make it clearer that the purpose of media-dependent imp… · w3c/csswg-drafts@c5c9e02 · GitHub
Skip to content

Commit c5c9e02

Browse files
committed
[css-cascade] Make it clearer that the purpose of media-dependent imports is just to control the application of styles, and that conditional fetching is just an optional thing browsers are allowed to do.
--HG-- extra : rebase_source : ec7590c80ea05833450b33abb3f5eba92dc56a25
1 parent 0eeaa56 commit c5c9e02

2 files changed

Lines changed: 21 additions & 15 deletions

File tree

css-cascade/Overview.html

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</a></p>
1313
<h1 class="p-name no-ref" id=title>CSS Cascading and Inheritance Level 3</h1>
1414
<h2 class="no-num no-toc no-ref" id=subtitle><span class=content>Editor's Draft,
15-
<span class=dt-updated><span class=value-title title=20130812>12 August 2013</span></span></span></h2>
15+
<span class=dt-updated><span class=value-title title=20130813>13 August 2013</span></span></span></h2>
1616
<div data-fill-with=spec-metadata><dl><dt>This version:<dd><a class=u-url href=http://dev.w3.org/csswg/css-cascade/>http://dev.w3.org/csswg/css-cascade/</a><dt>Latest version:<dd><a href=http://www.w3.org/TR/css3-cascade/>http://www.w3.org/TR/css3-cascade/</a><dt>Editor's Draft:<dd><a href=http://dev.w3.org/csswg/css-cascade/>http://dev.w3.org/csswg/css-cascade/</a><dt>Previous Versions:<dd><a href=http://www.w3.org/TR/2013/WD-css3-cascade-20130103/ rel=previous>http://www.w3.org/TR/2013/WD-css3-cascade-20130103/</a><dd><a href=http://www.w3.org/TR/2005/WD-css3-cascade-20051215/ rel=previous>http://www.w3.org/TR/2005/WD-css3-cascade-20051215/</a>
1717
<dt>Feedback:</dt>
1818
<dd><a href="mailto:www-style@w3.org?subject=%5Bcss-cascade%5D%20feedback">www-style@w3.org</a>
@@ -161,12 +161,19 @@ <h2 data-level=2 id=at-import><span class=secno>2 </span><span class=content>
161161
are scoped in the same way.
162162

163163
<p>
164-
So that user agents can avoid retrieving resources for unsupported media types,
165-
authors may specify media-dependent <a class=css data-link-type=maybe href=#at-ruledef-import>@import</a> rules.
164+
Authors may also specify media-dependent <a class=css data-link-type=maybe href=#at-ruledef-import>@import</a> rules.
166165
Such media-dependent imports include a comma-separated list of “media queries” after the URI.
167166
In the absence of any media query, the import is unconditional.
168167
(Specifying <span class=css data-link-type=maybe>all</span> for the medium has the same effect.)
169-
The UA must import the style sheet if (and only if) the media condition evaluates to true.
168+
If the media query does not match,
169+
the rules in the imported stylesheet do not apply,
170+
exactly as if the imported stylesheet were wrapped in an <span class=css data-link-type=maybe>@media</span> block with the given media query.
171+
The evaluation and full syntax of the expressions after the URL
172+
is defined by the Media Queries specification <a data-biblio-type=normative data-link-type=biblio href=#mediaq title=MEDIAQ>[MEDIAQ]</a>.
173+
174+
<p>
175+
User agents may avoid fetching a media-dependent import
176+
until the media query matches.
170177

171178
<div class=example>
172179
<p>
@@ -179,10 +186,6 @@ <h2 data-level=2 id=at-import><span class=secno>2 </span><span class=content>
179186
<!--
180187
-->@import url("narrow.css") handheld and (max-width: 400px);</pre> </div>
181188

182-
<p>
183-
The evaluation and full syntax of the expressions after the URL
184-
is defined by the Media Queries specification <a data-biblio-type=normative data-link-type=biblio href=#mediaq title=MEDIAQ>[MEDIAQ]</a>.
185-
186189
<p>
187190
When the same style sheet is imported or linked to a document in multiple places,
188191
user agents must process (or act as though they do) each link

css-cascade/Overview.src.html

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,19 @@ <h2 id="at-import">
7373
are scoped in the same way.
7474

7575
<p>
76-
So that user agents can avoid retrieving resources for unsupported media types,
77-
authors may specify media-dependent ''@import'' rules.
76+
Authors may also specify media-dependent ''@import'' rules.
7877
Such media-dependent imports include a comma-separated list of “media queries” after the URI.
7978
In the absence of any media query, the import is unconditional.
8079
(Specifying ''all'' for the medium has the same effect.)
81-
The UA must import the style sheet if (and only if) the media condition evaluates to true.
80+
If the media query does not match,
81+
the rules in the imported stylesheet do not apply,
82+
exactly as if the imported stylesheet were wrapped in an ''@media'' block with the given media query.
83+
The evaluation and full syntax of the expressions after the URL
84+
is defined by the Media Queries specification [[!MEDIAQ]].
85+
86+
<p>
87+
User agents may avoid fetching a media-dependent import
88+
until the media query matches.
8289

8390
<div class=example>
8491
<p>
@@ -90,10 +97,6 @@ <h2 id="at-import">
9097
-->@import url("narrow.css") handheld and (max-width: 400px);</pre>
9198
</div>
9299

93-
<p>
94-
The evaluation and full syntax of the expressions after the URL
95-
is defined by the Media Queries specification [[!MEDIAQ]].
96-
97100
<p>
98101
When the same style sheet is imported or linked to a document in multiple places,
99102
user agents must process (or act as though they do) each link

0 commit comments

Comments
 (0)