[html5] r3926 - [] (0) Update media query requirements to treat '' as 'all'. Fixing http://www.w [...]
whatwg at whatwg.org
whatwg at whatwg.org
Mon Sep 21 03:05:45 PDT 2009
Author: ianh
Date: 2009-09-21 03:05:44 -0700 (Mon, 21 Sep 2009)
New Revision: 3926
Modified:
index
source
Log:
[] (0) Update media query requirements to treat '' as 'all'.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=7646
Modified: index
===================================================================
--- index 2009-09-21 09:36:21 UTC (rev 3925)
+++ index 2009-09-21 10:05:44 UTC (rev 3926)
@@ -249,7 +249,8 @@
<li><a href=#space-separated-tokens><span class=secno>2.4.7 </span>Space-separated tokens</a></li>
<li><a href=#comma-separated-tokens><span class=secno>2.4.8 </span>Comma-separated tokens</a></li>
<li><a href=#reversed-dns-identifiers><span class=secno>2.4.9 </span>Reversed DNS identifiers</a></li>
- <li><a href=#syntax-references><span class=secno>2.4.10 </span>References</a></ol></li>
+ <li><a href=#syntax-references><span class=secno>2.4.10 </span>References</a></li>
+ <li><a href=#mq><span class=secno>2.4.11 </span>Media queries</a></ol></li>
<li><a href=#urls><span class=secno>2.5 </span>URLs</a>
<ol>
<li><a href=#terminology-0><span class=secno>2.5.1 </span>Terminology</a></li>
@@ -2265,7 +2266,7 @@
</dd>
- <dt id=mq>Media Queries</dt>
+ <dt>Media Queries</dt>
<dd>
@@ -4666,6 +4667,21 @@
</ol></div>
+ <h4 id=mq><span class=secno>2.4.11 </span>Media queries</h4>
+
+ <p>A string is a <dfn id=valid-media-query>valid media query</dfn> if it matches the
+ <code title="">media_query_list</code> production of the Media
+ Queries specification. <a href=#refsMQ>[MQ]</a></p>
+
+ <p>A string <dfn id=matches-the-environment>matches the environment</dfn> of a view if it is
+ the empty string, a string consisting of only <a href=#space-character title="space
+ character">space characters</a>, or is a media query that matches
+ that view's environment according to the definitions given in the
+ Media Queries specification. <a href=#refsMQ>[MQ]</a></p>
+
+
+
+
<h3 id=urls><span class=secno>2.5 </span>URLs</h3>
<h4 id=terminology-0><span class=secno>2.5.1 </span>Terminology</h4>
@@ -10555,7 +10571,7 @@
<p>The <dfn id=attr-link-media title=attr-link-media><code>media</code></dfn>
attribute says which media the resource applies to. The value must
- be a valid <a href=#mq>media query</a>. <a href=#refsMQ>[MQ]</a></p>
+ be a <a href=#valid-media-query>valid media query</a>.</p>
<div class=impl>
@@ -10566,10 +10582,11 @@
<p>However, if the link is an <a href=#external-resource-link>external resource link</a>,
then the <code title=attr-link-media><a href=#attr-link-media>media</a></code> attribute is
- prescriptive. The user agent must apply the external resource to
- <a href=#view title=view>views</a> while their state match the listed
- media and the other relevant conditions apply, and must not apply
- them otherwise.</p><!-- note similar text in <style> section -->
+ prescriptive. The user agent must apply the external resource to a
+ <a href=#view>view</a> when the <code title=attr-link-media><a href=#attr-link-media>media</a></code> attribute's value <a href=#matches-the-environment>matches
+ the environment</a> of that view and the other relevant
+ conditions apply, and must not apply it otherwise.</p><!-- note
+ similar text in <style> section -->
<p class=note>The external resource might have further
restrictions defined within that limit its applicability. For
@@ -10579,8 +10596,7 @@
</div>
- <p id=default-media>The default, if the <code title=attr-link-media><a href=#attr-link-media>media</a></code> attribute is omitted, is
- <code>all</code>, meaning that by default links apply to all
+ <p id=default-media>The default, if the <code title=attr-link-media><a href=#attr-link-media>media</a></code> attribute is omitted, is "<code title="">all</code>", meaning that by default links apply to all
media.</p>
<p>The <dfn id=attr-link-hreflang title=attr-link-hreflang><code>hreflang</code></dfn>
@@ -11572,12 +11588,17 @@
</div>
+ <p>However, if the link is an <a href=#external-resource-link>external resource link</a>,
+ then the <code title=attr-link-media><a href=#attr-link-media>media</a></code> attribute is
+ prescriptive.
+
<p>The <dfn id=attr-style-media title=attr-style-media><code>media</code></dfn>
attribute says which media the styles apply to. The value must be a
- valid <a href=#mq>media query</a>. <a href=#refsMQ>[MQ]</a>
- <span class=impl>User agents must apply the styles to <a href=#view title=view>views</a> while their state match the listed media,
- and must not apply them otherwise.</span></p><!-- note similar text
- in <link> section -->
+ <a href=#valid-media-query>valid media query</a>. <span class=impl>The user agent
+ must apply the styles to a <a href=#view>view</a> when the <code title=attr-style-media><a href=#attr-style-media>media</a></code> attribute's value
+ <a href=#matches-the-environment>matches the environment</a> of that view and the other
+ relevant conditions apply, and must not apply them
+ otherwise.</span></p><!-- note similar text in <link> section -->
<div class=impl>
@@ -11590,8 +11611,8 @@
</div>
<p id=style-default-media>The default, if the <code title=attr-style-media><a href=#attr-style-media>media</a></code> attribute is omitted, is
- <code>all</code>, meaning that by default styles apply to all
- media.</p>
+ "<code title="">all</code>", meaning that by default styles apply to
+ all media.</p>
<p>The <dfn id=attr-style-scoped title=attr-style-scoped><code>scoped</code></dfn>
attribute is a <a href=#boolean-attribute>boolean attribute</a>. If set, it indicates
@@ -21356,8 +21377,12 @@
attribute gives the intended media type of the <a href=#media-resource>media
resource</a>, to help the user agent determine if this
<a href=#media-resource>media resource</a> is useful to the user before fetching
- it. Its value must be a valid <a href=#mq>media query</a>. <a href=#refsMQ>[MQ]</a></p>
+ it. Its value must be a <a href=#valid-media-query>valid media query</a>.</p>
+ <p id=source-default-media>The default, if the <code title=attr-srouce-media>media</code> attribute is omitted, is
+ "<code title="">all</code>", meaning that by default styles apply to
+ all media.</p>
+
<div class=impl>
<p>If a <code><a href=#the-source-element>source</a></code> element is inserted as a child of a
@@ -22054,10 +22079,10 @@
that the user agent knows it cannot render</a>, then end the
<a href=#synchronous-section>synchronous section</a>, and jump down to the <i title="">failed</i> step below.</li>
- <li><p>⌛ If <var title="">candidate</var> has a <code title=attr-source-media><a href=#attr-source-media>media</a></code> attribute whose value,
- when processed according to the rules for <a href=#mq>media
- queries</a>, does not match the current environment, then end the
- <a href=#synchronous-section>synchronous section</a>, and jump down to the <i title="">failed</i> step below. <a href=#refsMQ>[MQ]</a></li>
+ <li><p>⌛ If <var title="">candidate</var> has a <code title=attr-source-media><a href=#attr-source-media>media</a></code> attribute whose value does
+ not <a href=#matches-the-environment title="matches the environment">match the
+ environment</a> of the <a href=#default-view>default view</a>, then end the
+ <a href=#synchronous-section>synchronous section</a>, and jump down to the <i title="">failed</i> step below.</li>
<li><p>End the <a href=#synchronous-section>synchronous section</a>, continuing the
remaining steps asynchronously.</li>
@@ -55038,9 +55063,9 @@
<p>The <dfn id=attr-hyperlink-media title=attr-hyperlink-media><code>media</code></dfn>
attribute describes for which media the target document was
- designed. It is purely advisory. The value must be a valid <a href=#mq>media query</a>. <a href=#refsMQ>[MQ]</a> The default,
- if the <code title=attr-hyperlink-media><a href=#attr-hyperlink-media>media</a></code> attribute is
- omitted, is <code>all</code>.</p>
+ designed. It is purely advisory. The value must be a <a href=#valid-media-query>valid
+ media query</a>. The default, if the <code title=attr-hyperlink-media><a href=#attr-hyperlink-media>media</a></code> attribute is omitted, is
+ "<code title="">all</code>".</p>
<p>The <dfn id=attr-hyperlink-hreflang title=attr-hyperlink-hreflang><code>hreflang</code></dfn>
attribute on hyperlink elements, if present, gives the language of
Modified: source
===================================================================
--- source 2009-09-21 09:36:21 UTC (rev 3925)
+++ source 2009-09-21 10:05:44 UTC (rev 3926)
@@ -1300,7 +1300,7 @@
</dd>
- <dt id="mq">Media Queries</dt>
+ <dt>Media Queries</dt>
<dd>
@@ -4262,6 +4262,21 @@
</div>
+ <h4 id="mq">Media queries</h4>
+
+ <p>A string is a <dfn>valid media query</dfn> if it matches the
+ <code title="">media_query_list</code> production of the Media
+ Queries specification. <a href="#refsMQ">[MQ]</a></p>
+
+ <p>A string <dfn>matches the environment</dfn> of a view if it is
+ the empty string, a string consisting of only <span title="space
+ character">space characters</span>, or is a media query that matches
+ that view's environment according to the definitions given in the
+ Media Queries specification. <a href="#refsMQ">[MQ]</a></p>
+
+
+
+
<h3>URLs</h3>
<h4>Terminology</h4>
@@ -11031,8 +11046,7 @@
<p>The <dfn title="attr-link-media"><code>media</code></dfn>
attribute says which media the resource applies to. The value must
- be a valid <a href="#mq">media query</a>. <a
- href="#refsMQ">[MQ]</a></p>
+ be a <span>valid media query</span>.</p>
<div class="impl">
@@ -11043,10 +11057,12 @@
<p>However, if the link is an <span>external resource link</span>,
then the <code title="attr-link-media">media</code> attribute is
- prescriptive. The user agent must apply the external resource to
- <span title="view">views</span> while their state match the listed
- media and the other relevant conditions apply, and must not apply
- them otherwise.</p><!-- note similar text in <style> section -->
+ prescriptive. The user agent must apply the external resource to a
+ <span>view</span> when the <code
+ title="attr-link-media">media</code> attribute's value <span>matches
+ the environment</span> of that view and the other relevant
+ conditions apply, and must not apply it otherwise.</p><!-- note
+ similar text in <style> section -->
<p class="note">The external resource might have further
restrictions defined within that limit its applicability. For
@@ -11058,8 +11074,8 @@
</div>
<p id="default-media">The default, if the <code
- title="attr-link-media">media</code> attribute is omitted, is
- <code>all</code>, meaning that by default links apply to all
+ title="attr-link-media">media</code> attribute is omitted, is "<code
+ title="">all</code>", meaning that by default links apply to all
media.</p>
<p>The <dfn title="attr-link-hreflang"><code>hreflang</code></dfn>
@@ -12194,13 +12210,18 @@
</div>
+ <p>However, if the link is an <span>external resource link</span>,
+ then the <code title="attr-link-media">media</code> attribute is
+ prescriptive.
+
<p>The <dfn title="attr-style-media"><code>media</code></dfn>
attribute says which media the styles apply to. The value must be a
- valid <a href="#mq">media query</a>. <a href="#refsMQ">[MQ]</a>
- <span class="impl">User agents must apply the styles to <span
- title="view">views</span> while their state match the listed media,
- and must not apply them otherwise.</span></p><!-- note similar text
- in <link> section -->
+ <span>valid media query</span>. <span class="impl">The user agent
+ must apply the styles to a <span>view</span> when the <code
+ title="attr-style-media">media</code> attribute's value
+ <span>matches the environment</span> of that view and the other
+ relevant conditions apply, and must not apply them
+ otherwise.</span></p><!-- note similar text in <link> section -->
<div class="impl">
@@ -12214,8 +12235,8 @@
<p id="style-default-media">The default, if the <code
title="attr-style-media">media</code> attribute is omitted, is
- <code>all</code>, meaning that by default styles apply to all
- media.</p>
+ "<code title="">all</code>", meaning that by default styles apply to
+ all media.</p>
<p>The <dfn title="attr-style-scoped"><code>scoped</code></dfn>
attribute is a <span>boolean attribute</span>. If set, it indicates
@@ -22945,9 +22966,13 @@
attribute gives the intended media type of the <span>media
resource</span>, to help the user agent determine if this
<span>media resource</span> is useful to the user before fetching
- it. Its value must be a valid <a href="#mq">media query</a>. <a
- href="#refsMQ">[MQ]</a></p>
+ it. Its value must be a <span>valid media query</span>.</p>
+ <p id="source-default-media">The default, if the <code
+ title="attr-srouce-media">media</code> attribute is omitted, is
+ "<code title="">all</code>", meaning that by default styles apply to
+ all media.</p>
+
<div class="impl">
<p>If a <code>source</code> element is inserted as a child of a
@@ -23781,12 +23806,11 @@
title="">failed</i> step below.</p></li>
<li><p>⌛ If <var title="">candidate</var> has a <code
- title="attr-source-media">media</code> attribute whose value,
- when processed according to the rules for <a href="#mq">media
- queries</a>, does not match the current environment, then end the
+ title="attr-source-media">media</code> attribute whose value does
+ not <span title="matches the environment">match the
+ environment</span> of the <span>default view</span>, then end the
<span>synchronous section</span>, and jump down to the <i
- title="">failed</i> step below. <a
- href="#refsMQ">[MQ]</a></p></li>
+ title="">failed</i> step below.</p></li>
<li><p>End the <span>synchronous section</span>, continuing the
remaining steps asynchronously.</p></li>
@@ -64178,10 +64202,10 @@
<p>The <dfn title="attr-hyperlink-media"><code>media</code></dfn>
attribute describes for which media the target document was
- designed. It is purely advisory. The value must be a valid <a
- href="#mq">media query</a>. <a href="#refsMQ">[MQ]</a> The default,
- if the <code title="attr-hyperlink-media">media</code> attribute is
- omitted, is <code>all</code>.</p>
+ designed. It is purely advisory. The value must be a <span>valid
+ media query</span>. The default, if the <code
+ title="attr-hyperlink-media">media</code> attribute is omitted, is
+ "<code title="">all</code>".</p>
<p>The <dfn
title="attr-hyperlink-hreflang"><code>hreflang</code></dfn>
More information about the Commit-Watchers
mailing list