Skip to content

Commit e2d80c5

Browse files
committed
[mediaqueries] Make <media-query-list> use the algo from Syntax.
1 parent 5345a4a commit e2d80c5

2 files changed

Lines changed: 9 additions & 17 deletions

File tree

mediaqueries/Overview.bs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -618,14 +618,10 @@ Syntax</h2>
618618
The formal media query syntax is described in this section,
619619
with the rule/property grammar syntax defined in [[!CSS3SYN]] and [[!CSS3VAL]].
620620

621-
The <dfn>&lt;media-query-list></dfn> production must be parsed by <a title="consume a component value" spec=css-syntax>consuming a component value</a>
622-
and collecting the return value
623-
until a <<comma-token>> or <<eof-token>> is encountered,
624-
at which point it parses its accumulated results
625-
(not including the <<comma-token>> or <<eof-token>>)
626-
as a <<media-query>>.
627-
It repeats this process until an <<eof-token>> is encountered,
628-
at which points its value is a list of its parsed <<media-query>>s.
621+
To parse a <dfn>&lt;media-query-list></dfn> production,
622+
<a>parse a comma-separated list of component values</a>,
623+
then parse each entry in the returned list as a <<media-query>>.
624+
Its value is the list of <<media-query>>s so produced.
629625

630626
Note: This explicit definition of <<media-query-list>> parsing
631627
is necessary to make the error-recovery behavior of <a>media query lists</a> well-defined.

mediaqueries/Overview.html

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
</p>
6161
<h1 class="p-name no-ref" id=title>Media Queries Level 4</h1>
6262
<h2 class="no-num no-toc no-ref heading settled heading" id=subtitle><span class=content>Editor’s Draft,
63-
<span class=dt-updated><span class=value-title title=20140412>12 April 2014</span></span></span></h2>
63+
<span class=dt-updated><span class=value-title title=20140414>14 April 2014</span></span></span></h2>
6464
<div data-fill-with=spec-metadata><dl><dt>This version:<dd><a class=u-url href=http://dev.w3.org/csswg/mediaqueries4/>http://dev.w3.org/csswg/mediaqueries4/</a><dt>Editor’s Draft:<dd><a href=http://dev.w3.org/csswg/mediaqueries4/>http://dev.w3.org/csswg/mediaqueries4/</a>
6565
<dt>Feedback:</dt>
6666
<dd><a href="mailto:www-style@w3.org?subject=%5Bmediaqueries%5D%20feedback">www-style@w3.org</a>
@@ -1113,14 +1113,10 @@ <h2 class="heading settled heading" data-level=3 id=mq-syntax><span class=secno>
11131113
The formal media query syntax is described in this section,
11141114
with the rule/property grammar syntax defined in <a data-biblio-type=normative data-link-type=biblio href=#css3syn title=css3syn>[CSS3SYN]</a> and <a data-biblio-type=normative data-link-type=biblio href=#css3val title=css3val>[CSS3VAL]</a>.
11151115

1116-
<p> The <dfn class=css-code data-dfn-type=type data-export="" id=typedef-media-query-list>&lt;media-query-list&gt;<a class=self-link href=#typedef-media-query-list></a></dfn> production must be parsed by <a data-link-spec=css-syntax data-link-type=dfn href=http://dev.w3.org/csswg/css-syntax-3/#consume-a-component-value0 title="consume a component value">consuming a component value</a>
1117-
and collecting the return value
1118-
until a <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-syntax-3/#typedef-comma-token title="<comma-token>">&lt;comma-token&gt;</a> or <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-syntax-3/#typedef-eof-token title="<eof-token>">&lt;eof-token&gt;</a> is encountered,
1119-
at which point it parses its accumulated results
1120-
(not including the <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-syntax-3/#typedef-comma-token title="<comma-token>">&lt;comma-token&gt;</a> or <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-syntax-3/#typedef-eof-token title="<eof-token>">&lt;eof-token&gt;</a>)
1121-
as a <a class="production css-code" data-link-type=type href=#typedef-media-query title="<media-query>">&lt;media-query&gt;</a>.
1122-
It repeats this process until an <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-syntax-3/#typedef-eof-token title="<eof-token>">&lt;eof-token&gt;</a> is encountered,
1123-
at which points its value is a list of its parsed <a class="production css-code" data-link-type=type href=#typedef-media-query title="<media-query>">&lt;media-query&gt;</a>s.
1116+
<p> To parse a <dfn class=css-code data-dfn-type=type data-export="" id=typedef-media-query-list>&lt;media-query-list&gt;<a class=self-link href=#typedef-media-query-list></a></dfn> production,
1117+
<a data-link-type=dfn href=http://dev.w3.org/csswg/css-syntax-3/#parse-a-comma-separated-list-of-component-values0 title="parse a comma-separated list of component values">parse a comma-separated list of component values</a>,
1118+
then parse each entry in the returned list as a <a class="production css-code" data-link-type=type href=#typedef-media-query title="<media-query>">&lt;media-query&gt;</a>.
1119+
Its value is the list of <a class="production css-code" data-link-type=type href=#typedef-media-query title="<media-query>">&lt;media-query&gt;</a>s so produced.
11241120

11251121
<p class=note> Note: This explicit definition of <a class="production css-code" data-link-type=type href=#typedef-media-query-list title="<media-query-list>">&lt;media-query-list&gt;</a> parsing
11261122
is necessary to make the error-recovery behavior of <a data-link-type=dfn href=#media-query-list title="media query lists">media query lists</a> well-defined.

0 commit comments

Comments
 (0)