Skip to content

Commit a4463e6

Browse files
committed
[mediaqueries] Update to new railroad syntax. Fix minor railroad error.
--HG-- extra : rebase_source : 9b330234ba2ba6318fb20c2547165b50ab0c7c18
1 parent 602d937 commit a4463e6

2 files changed

Lines changed: 110 additions & 93 deletions

File tree

mediaqueries/Overview.html

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
</p>
5555
<h1 class="p-name no-ref" id=title>Media Queries Level 4</h1>
5656
<h2 class="no-num no-toc no-ref heading settled heading" id=subtitle><span class=content>Editor’s Draft,
57-
<span class=dt-updated><span class=value-title title=20131113>13 November 2013</span></span></span></h2>
57+
<span class=dt-updated><span class=value-title title=20131114>14 November 2013</span></span></span></h2>
5858
<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>
5959
<dt>Feedback:</dt>
6060
<dd><a href="mailto:www-style@w3.org?subject=%5Bmediaqueries%5D%20feedback">www-style@w3.org</a>
@@ -449,7 +449,7 @@ <h3 class="heading settled heading" data-level=2.1 id=mq-list><span class=secno>
449449
</path><g>
450450
<path d="M70 41h0">
451451
</path><path d="M178 41h0">
452-
</path><rect height=22 rx=10 ry=10 width=108 x=70 y=30>
452+
</path><rect height=22 width=108 x=70 y=30>
453453
</rect><text x=124 y=45>
454454
media query</text></g><path d="M178 41h10">
455455
</path><path d="M70 41a10 10 0 0 0 -10 10v10a10 10 0 0 0 10 10">
@@ -828,53 +828,53 @@ <h4 class="heading settled heading" data-level=2.4.3 id=mq-range-context><span c
828828
</path><path d="M576 121h0">
829829
</path><path d="M88 121h20">
830830
</path><g>
831-
<path d="M108 121h78">
832-
</path><path d="M478 121h78">
833-
</path><path d="M186 121h10">
834-
</path><g>
835-
<path d="M196 121h0">
836-
</path><path d="M312 121h0">
837-
</path><rect height=22 width=116 x=196 y=110>
838-
</rect><text x=254 y=125>
839-
feature name</text></g><path d="M312 121h10">
840-
</path><g>
841-
<path d="M322 121h0">
842-
</path><path d="M398 121h0">
843-
</path><path d="M322 121a10 10 0 0 0 10 -10v-10a10 10 0 0 1 10 -10">
844-
</path><g>
845-
<path d="M342 91h4">
846-
</path><path d="M374 91h4">
847-
</path><rect height=22 rx=10 ry=10 width=28 x=346 y=80>
848-
</rect><text x=360 y=95>
849-
&gt;</text></g><path d="M378 91a10 10 0 0 1 10 10v10a10 10 0 0 0 10 10">
850-
</path><path d="M322 121a10 10 0 0 0 10 -10v-40a10 10 0 0 1 10 -10">
851-
</path><g>
852-
<path d="M342 61h0">
853-
</path><path d="M378 61h0">
854-
</path><rect height=22 rx=10 ry=10 width=36 x=342 y=50>
855-
</rect><text x=360 y=65>
856-
&lt;=</text></g><path d="M378 61a10 10 0 0 1 10 10v40a10 10 0 0 0 10 10">
857-
</path><path d="M322 121a10 10 0 0 0 10 -10v-70a10 10 0 0 1 10 -10">
858-
</path><g>
859-
<path d="M342 31h4">
860-
</path><path d="M374 31h4">
861-
</path><rect height=22 rx=10 ry=10 width=28 x=346 y=20>
862-
</rect><text x=360 y=35>
863-
&lt;</text></g><path d="M378 31a10 10 0 0 1 10 10v70a10 10 0 0 0 10 10">
864-
</path><path d="M322 121h20">
865-
</path><g>
866-
<path d="M342 121h0">
867-
</path><path d="M378 121h0">
868-
</path><rect height=22 rx=10 ry=10 width=36 x=342 y=110>
869-
</rect><text x=360 y=125>
870-
&gt;=</text></g><path d="M378 121h20">
871-
</path></g><path d="M398 121h10">
872-
</path><g>
873-
<path d="M408 121h0">
874-
</path><path d="M468 121h0">
875-
</path><rect height=22 width=60 x=408 y=110>
831+
<path d="M108 121h46">
832+
</path><path d="M510 121h46">
833+
</path><path d="M154 121h10">
834+
</path><g>
835+
<path d="M164 121h0">
836+
</path><path d="M280 121h0">
837+
</path><rect height=22 width=116 x=164 y=110>
838+
</rect><text x=222 y=125>
839+
feature name</text></g><path d="M280 121h10">
840+
</path><g>
841+
<path d="M290 121h0">
842+
</path><path d="M366 121h0">
843+
</path><path d="M290 121a10 10 0 0 0 10 -10v-10a10 10 0 0 1 10 -10">
844+
</path><g>
845+
<path d="M310 91h4">
846+
</path><path d="M342 91h4">
847+
</path><rect height=22 rx=10 ry=10 width=28 x=314 y=80>
848+
</rect><text x=328 y=95>
849+
&gt;</text></g><path d="M346 91a10 10 0 0 1 10 10v10a10 10 0 0 0 10 10">
850+
</path><path d="M290 121a10 10 0 0 0 10 -10v-40a10 10 0 0 1 10 -10">
851+
</path><g>
852+
<path d="M310 61h0">
853+
</path><path d="M346 61h0">
854+
</path><rect height=22 rx=10 ry=10 width=36 x=310 y=50>
855+
</rect><text x=328 y=65>
856+
&lt;=</text></g><path d="M346 61a10 10 0 0 1 10 10v40a10 10 0 0 0 10 10">
857+
</path><path d="M290 121a10 10 0 0 0 10 -10v-70a10 10 0 0 1 10 -10">
858+
</path><g>
859+
<path d="M310 31h4">
860+
</path><path d="M342 31h4">
861+
</path><rect height=22 rx=10 ry=10 width=28 x=314 y=20>
862+
</rect><text x=328 y=35>
863+
&lt;</text></g><path d="M346 31a10 10 0 0 1 10 10v70a10 10 0 0 0 10 10">
864+
</path><path d="M290 121h20">
865+
</path><g>
866+
<path d="M310 121h0">
867+
</path><path d="M346 121h0">
868+
</path><rect height=22 rx=10 ry=10 width=36 x=310 y=110>
869+
</rect><text x=328 y=125>
870+
&gt;=</text></g><path d="M346 121h20">
871+
</path></g><path d="M366 121h10">
872+
</path><g>
873+
<path d="M376 121h0">
874+
</path><path d="M500 121h0">
875+
</path><rect height=22 width=124 x=376 y=110>
876876
</rect><text x=438 y=125>
877-
value</text></g><path d="M468 121h10">
877+
feature value</text></g><path d="M500 121h10">
878878
</path></g><path d="M556 121h20">
879879
</path><path d="M88 121a10 10 0 0 1 10 10v10a10 10 0 0 0 10 10">
880880
</path><g>

mediaqueries/Overview.src.html

Lines changed: 62 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -137,19 +137,23 @@ <h2 id="media">
137137
and zero or more <a>media features</a>:
138138

139139
<pre class='railroad'>
140-
Diagram(
141-
Or(1,
142-
Skip(),
143-
And(
144-
Opt("not", skip=True),
145-
Plus(NT("media feature"), "and")),
146-
And(
147-
Or(1,
148-
"only",
149-
Skip(),
150-
"not"),
151-
NT("media type"),
152-
Star(NT("media feature"), "and"))))
140+
Or: 1
141+
S:
142+
And:
143+
Opt: skip
144+
T: not
145+
Plus:
146+
N: media feature
147+
T: and
148+
And:
149+
Or: 1
150+
T: only
151+
S:
152+
T: not
153+
N: media type
154+
Star:
155+
N: media feature
156+
T: and
153157
</pre>
154158

155159
A <a>media query</a> is a logical expression that is either true or false.
@@ -200,8 +204,9 @@ <h3 id='mq-list'>
200204
Several <a>media queries</a> can be combined into a comma-separated <dfn export>media query list</dfn>.
201205

202206
<pre class='railroad'>
203-
Diagram(
204-
Star("media query", ","))
207+
Star:
208+
N: media query
209+
T: ,
205210
</pre>
206211

207212
A <a>media query list</a> is true if <em>any</em> of its component <a>media queries</a> are true,
@@ -363,16 +368,17 @@ <h3 id='mq-features'>
363368
or in range form with a comparison operator.
364369

365370
<pre class='railroad'>
366-
Diagram(
367-
"(",
368-
Choice(0,
369-
And(
370-
NT("feature name"),
371-
":",
372-
NT("feature value")),
373-
NT("feature name"),
374-
And(NT("range form"), C("(see below)"))),
375-
")")
371+
T: (
372+
Choice:
373+
And:
374+
N: feature name
375+
T: :
376+
N: feature value
377+
N: feature name
378+
And:
379+
N: range form
380+
C: (see below)
381+
T: )
376382
</pre>
377383

378384
There are, however, several important differences between properties and media features:
@@ -506,26 +512,37 @@ <h4 id="mq-range-context">
506512
using ordinary mathematical comparison operators:
507513

508514
<pre class='railroad'>
509-
Diagram(
510-
'(',
511-
Or(0,
512-
Sequence(
513-
NT("feature name"),
514-
Choice(3,"<", "<=", ">", ">="),
515-
NT("value")),
516-
Sequence(
517-
NT("value"),
518-
Choice(0, "<", "<="),
519-
NT("feature name"),
520-
Choice(0, "<", "<="),
521-
NT("value")),
522-
Sequence(
523-
NT("value"),
524-
Choice(0, ">", ">="),
525-
NT("feature name"),
526-
Choice(0, ">", ">="),
527-
NT("value"))),
528-
')')
515+
T: (
516+
Choice:
517+
Seq:
518+
N: feature name
519+
Choice: 3
520+
T: <
521+
T: <=
522+
T: >
523+
T: >=
524+
N: feature value
525+
Seq:
526+
N: value
527+
Choice:
528+
T: <
529+
T: <=
530+
N: feature name
531+
Choice:
532+
T: <
533+
T: <=
534+
N: value
535+
Seq:
536+
N: value
537+
Choice:
538+
T: >
539+
T: >=
540+
N: feature name
541+
Choice:
542+
T: >
543+
T: >=
544+
N: value
545+
T: )
529546
</pre>
530547

531548
The basic form,

0 commit comments

Comments
 (0)