You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Media queries are defined by the Media Queries specification. This
314
-
section defines various concepts around media queries, including their API
313
+
[=Media queries=] are defined by [[!MEDIAQUERIES]]. This
314
+
section defines various concepts around [=media queries=], including their API
315
315
and serialization form.
316
316
317
-
<!-- XXX ref -->
318
-
319
317
320
318
Parsing Media Queries {#parsing-media-queries}
321
319
----------------------------------------------
322
320
323
321
To <dfn export>parse a media query list</dfn> for a
324
-
given string <var>s</var> into a media query list is defined in
322
+
given string <var>s</var> into a [=media query list=] is defined in
325
323
the Media Queries specification. Return the list of media
326
324
queries that the algorithm defined there gives. <!-- XXX ref -->
327
325
@@ -346,25 +344,24 @@ To
346
344
run these steps:
347
345
348
346
<ol>
349
-
<li>If the media query list is empty, then return the empty string.
347
+
<li>If the [=media query list=] is empty, then return the empty string.
350
348
351
-
<li><a lt="serialize a media query">Serialize</a> each media query in the list of media queries, in the same order as they appear in the list of
352
-
media queries, and then <a lt="serialize a comma-separated list">serialize</a> the list.
349
+
<li><a lt="serialize a media query">Serialize</a> each media query in the list of media queries, in the same order as they appear in the [=media query list=], and then <a lt="serialize a comma-separated list">serialize</a> the list.
353
350
</ol>
354
351
355
352
To
356
353
<dfn export>serialize a media query</dfn> let
357
354
<var>s</var> be the empty string, run the steps below:
358
355
359
356
<ol>
360
-
<li>If the media query is negated append "<code>not</code>", followed
357
+
<li>If the [=media query=] is negated append "<code>not</code>", followed
361
358
by a single SPACE (U+0020), to <var>s</var>.
362
359
363
360
<li>Let <var>type</var> be the <a lt="serialize an identifier">serialization
364
-
as an identifier</a> of the media type of the media query,
361
+
as an identifier</a> of the [=media type=] of the [=media query=],
365
362
<a lt="ASCII lowercase">converted to ASCII lowercase</a>.
366
363
367
-
<li>If the media query does not contain media features append
364
+
<li>If the [=media query=] does not contain [=media features=] append
368
365
<var>type</var>, to <var>s</var>,
369
366
then return <var>s</var>.
370
367
@@ -373,13 +370,13 @@ To
373
370
single SPACE (U+0020), followed by "<code>and</code>", followed by a single SPACE
374
371
(U+0020), to <var>s</var>.
375
372
376
-
<li>Sort the media features in lexicographical order.
373
+
<li>Sort the [=media features=] in lexicographical order.
377
374
378
375
<li>
379
-
Then, for each media feature:
376
+
Then, for each [=media feature=]:
380
377
381
378
<ol>
382
-
<li>Append a "<code>(</code>" (U+0028), followed by the media feature
379
+
<li>Append a "<code>(</code>" (U+0028), followed by the [=media feature=]
383
380
name, <a lt="ASCII lowercase">converted to ASCII lowercase</a>,
384
381
to <var>s</var>.
385
382
@@ -391,7 +388,7 @@ To
391
388
<li>Append a "<code>)</code>" (U+0029) to
392
389
<var>s</var>.
393
390
394
-
<li>If this is not the last media feature append a single SPACE (U+0020),
391
+
<li>If this is not the last [=media feature=] append a single SPACE (U+0020),
395
392
followed by "<code>and</code>", followed by a single SPACE (U+0020), to
0 commit comments