Skip to content

Commit 787b0b7

Browse files
committed
[css3-conditional] Make examples represent slighty better practices.
Addresses issue raised in http://lists.w3.org/Archives/Public/www-style/2012Dec/0224.html which is issue 1 in the LCWD disposition of comments.
1 parent 3a79b67 commit 787b0b7

2 files changed

Lines changed: 35 additions & 18 deletions

File tree

css3-conditional/Overview.html

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
rel=dcterms.rights>
1313
<meta content="CSS Conditional Rules Module Level 3" name=dcterms.title>
1414
<meta content=text name=dcterms.type>
15-
<meta content=2013-02-06 name=dcterms.issued>
15+
<meta content=2013-02-07 name=dcterms.issued>
1616
<meta content="http://dev.w3.org/csswg/css3-conditional/"
1717
name=dcterms.creator>
1818
<meta content=W3C name=dcterms.publisher>
19-
<meta content="http://www.w3.org/TR/2013/ED-css3-conditional-20130206/"
19+
<meta content="http://www.w3.org/TR/2013/ED-css3-conditional-20130207/"
2020
name=dcterms.identifier>
2121
<link href="../default.css" rel=stylesheet type="text/css">
2222
<link href="../csslogo.ico" rel="shortcut icon" type="image/x-icon">
@@ -33,14 +33,14 @@
3333

3434
<h1>CSS Conditional Rules Module Level 3</h1>
3535

36-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 6 February
36+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 7 February
3737
2013</h2>
3838

3939
<dl>
4040
<dt>This version:
4141

42-
<dd><a href="http://www.w3.org/TR/2013/ED-css3-conditional-20130206/">
43-
http://www.w3.org/TR/2013/ED-css3-conditional-20130206/</a>
42+
<dd><a href="http://www.w3.org/TR/2013/ED-css3-conditional-20130207/">
43+
http://www.w3.org/TR/2013/ED-css3-conditional-20130207/</a>
4444

4545
<dt>Latest version:
4646

@@ -364,6 +364,7 @@ <h2 id=processing><span class=secno>2. </span>Processing of conditional
364364
<p>For example, this rule:
365365

366366
<pre>@media print {
367+
/* hide navigation controls when printing */
367368
#navigation { display: none }
368369
}</pre>
369370

@@ -386,8 +387,10 @@ <h2 id=processing><span class=secno>2. </span>Processing of conditional
386387

387388
<div class=example>For example, with this set of nested rules:
388389
<pre>@media print { // rule (1)
390+
/* hide navigation controls when printing */
389391
#navigation { display: none }
390392
@media (max-width: 12cm) { // rule (2)
393+
/* keep notes in flow when printing to narrow pages */
391394
.note { float: none }
392395
}
393396
}</pre>
@@ -496,15 +499,18 @@ <h2 id=at-media><span class=secno>5. </span>Media-specific style sheets:
496499
<div class=example>
497500
<p>This ‘<code class=css>@media</code>’ rule:
498501

499-
<pre>@media print, (max-width: 600px) {
500-
#extra_navigation { display: none }
502+
<pre>@media screen and (min-width: 35em),
503+
print and (min-width: 40em) {
504+
#section_navigation { float: left; width: 10em; }
501505
}</pre>
502506

503-
<p>has the condition ‘<code class=css>print, (max-width:
504-
600px)</code>’, which is true for print media and for devices whose
505-
width is at most 600px. When either of these is true, the condition of
506-
the rule is true, and the rule ‘<code class=css>#extra_navigation {
507-
display: none }</code>’ is applied.
507+
<p>has the condition ‘<code class=css>screen and (min-width: 35em),
508+
print and (min-width: 40em)</code>’, which is true for screen displays
509+
whose viewport is at least 35 times the initial font size and for print
510+
displays whose viewport is at least 40 times the initial font size. When
511+
either of these is true, the condition of the rule is true, and the rule
512+
<code class=css>#section_navigation { float: left; width: 10em;
513+
}</code>’ is applied.
508514
</div>
509515

510516
<p>In terms of the grammar, this specification extends the <a

css3-conditional/Overview.src.html

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ <h2 id="processing">Processing of conditional group rules</h2>
193193
<div class="example">
194194
<p>For example, this rule:</p>
195195
<pre>@media print {
196+
/* hide navigation controls when printing */
196197
#navigation { display: none }
197198
}</pre>
198199
<p>causes a particular CSS rule (making elements with ID "navigation" be
@@ -215,8 +216,10 @@ <h2 id="processing">Processing of conditional group rules</h2>
215216

216217
<div class="example">For example, with this set of nested rules:
217218
<pre>@media print { // rule (1)
219+
/* hide navigation controls when printing */
218220
#navigation { display: none }
219221
@media (max-width: 12cm) { // rule (2)
222+
/* keep notes in flow when printing to narrow pages */
220223
.note { float: none }
221224
}
222225
}</pre>
@@ -308,13 +311,21 @@ <h2 id="at-media">Media-specific style sheets: the '@media' rule</h2>
308311

309312
<div class="example">
310313
<p>This '@media' rule:</p>
311-
<pre>@media print, (max-width: 600px) {
312-
#extra_navigation { display: none }
314+
<pre>@media screen and (min-width: 35em),
315+
print and (min-width: 40em) {
316+
#section_navigation { float: left; width: 10em; }
313317
}</pre>
314-
<p>has the condition ''print, (max-width: 600px)'', which is
315-
true for print media and for devices whose width is at most 600px. When
316-
either of these is true, the condition of the rule is true, and the rule
317-
''#extra_navigation { display: none }'' is applied.
318+
<p>has the condition
319+
''screen and (min-width: 35em), print and (min-width: 40em)'',
320+
which is true for screen displays
321+
whose viewport is at least 35 times the initial font size
322+
and for print displays
323+
whose viewport is at least 40 times the initial font size.
324+
When either of these is true,
325+
the condition of the rule is true,
326+
and the rule
327+
''#section_navigation { float: left; width: 10em; }''
328+
is applied.</p>
318329
</div>
319330

320331
<p>In terms of the grammar, this specification extends the

0 commit comments

Comments
 (0)