Skip to content

Commit 3af4a22

Browse files
committed
Fix the <pre> styling so that things indent properly.
1 parent 7c699c6 commit 3af4a22

2 files changed

Lines changed: 56 additions & 28 deletions

File tree

selectors4/Overview.html

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1580,7 +1580,8 @@ <h4 id=typenmsp><span class=secno>5.1.1. </span> Type selectors and
15801580
<div class=example>
15811581
<p>CSS examples:</p>
15821582

1583-
<pre>@namespace foo url(http://www.example.com);
1583+
<pre>
1584+
@namespace foo url(http://www.example.com);
15841585
foo|h1 { color: blue } /* first rule */
15851586
foo|* { color: yellow } /* second rule */
15861587
|h1 { color: red } /* ...*/
@@ -1874,7 +1875,8 @@ <h3 id=attrnmsp><span class=secno>6.4. </span> Attribute selectors and
18741875
<div class=example>
18751876
<p>CSS examples:</p>
18761877

1877-
<pre>@namespace foo "http://www.example.com";
1878+
<pre>
1879+
@namespace foo "http://www.example.com";
18781880
[foo|att=val] { color: blue }
18791881
[*|att] { color: yellow }
18801882
[|att] { color: green }
@@ -1985,7 +1987,8 @@ <h3 id=class-html><span class=secno>6.6. </span> Class selectors</h3>
19851987
<p>Given these rules, the first <code>H1</code> instance below would not
19861988
have green text, while the second would:</p>
19871989

1988-
<pre>&lt;H1&gt;Not green&lt;/H1&gt;
1990+
<pre>
1991+
&lt;H1&gt;Not green&lt;/H1&gt;
19891992
&lt;H1 class="pastoral"&gt;Very green&lt;/H1&gt;</pre>
19901993

19911994
<p>The following rule matches any <code>P</code> element whose
@@ -2245,7 +2248,8 @@ <h3 id=target-pseudo><span class=secno>7.4. </span> The target pseudo-class
22452248
<p>Here, the <code>:target</code> pseudo-class is used to make the target
22462249
element red and place an image before it, if there is one:</p>
22472250

2248-
<pre>*:target { color : red }
2251+
<pre>
2252+
*:target { color : red }
22492253
*:target::before { content : url(target.png) }</pre>
22502254
</div>
22512255

@@ -2538,7 +2542,8 @@ <h3 id=lang-pseudo><span class=secno>10.2. </span> The language
25382542
<code>:lang(fr)</code> (because both are in French). The P does not match
25392543
the <code>[lang|=fr]</code> because it does not have a LANG attribute.</p>
25402544

2541-
<pre>&lt;body lang=fr>
2545+
<pre>
2546+
&lt;body lang=fr>
25422547
&lt;p>Je suis français.&lt;/p>
25432548
&lt;/body></pre>
25442549
</div>
@@ -2783,7 +2788,8 @@ <h3 id=nth-child-pseudo><span class=secno>12.2. </span> ’‘<code
27832788
<div class=example>
27842789
<p>Examples:</p>
27852790

2786-
<pre>:nth-child(10n-1) /* represents the 9th, 19th, 29th, etc, element */
2791+
<pre>
2792+
:nth-child(10n-1) /* represents the 9th, 19th, 29th, etc, element */
27872793
:nth-child(10n+9) /* Same */
27882794
:nth-child(10n+-1) /* Syntactically invalid, and would be ignored */</pre>
27892795
</div>
@@ -2986,20 +2992,23 @@ <h3 id=first-child-pseudo><span class=secno>12.8. </span> ‘<code
29862992
<p>This selector can represent the <code>p</code> inside the
29872993
<code>div</code> of the following fragment:</p>
29882994

2989-
<pre>&lt;p&gt; The last P before the note.&lt;/p&gt;
2995+
<pre>
2996+
&lt;p&gt; The last P before the note.&lt;/p&gt;
29902997
&lt;div class="note"&gt;
29912998
&lt;p&gt; The first P inside the note.&lt;/p&gt;
29922999
&lt;/div&gt;</pre>
29933000
but cannot represent the second <code>p</code> in the following fragment:
2994-
<pre>&lt;p&gt; The last P before the note.&lt;/p&gt;
3001+
<pre>
3002+
&lt;p&gt; The last P before the note.&lt;/p&gt;
29953003
&lt;div class="note"&gt;
29963004
&lt;h2&gt; Note &lt;/h2&gt;
29973005
&lt;p&gt; The first P inside the note.&lt;/p&gt;
29983006
&lt;/div&gt;</pre>
29993007

30003008
<p>The following two selectors are usually equivalent:</p>
30013009

3002-
<pre>* &gt; a:first-child /* a is first child of any element */
3010+
<pre>
3011+
* &gt; a:first-child /* a is first child of any element */
30033012
a:first-child /* Same (assuming a is not the root element) */</pre>
30043013
</div>
30053014

@@ -3038,7 +3047,8 @@ <h3 id=first-of-type-pseudo><span class=secno>12.10. </span> ‘<code
30383047
<p>It is a valid description for the first two <code>dt</code> elements in
30393048
the following example but not for the third one:</p>
30403049

3041-
<pre>&lt;dl&gt;
3050+
<pre>
3051+
&lt;dl&gt;
30423052
&lt;dt&gt;gigogne&lt;/dt&gt;
30433053
&lt;dd&gt;
30443054
&lt;dl&gt;
@@ -3140,7 +3150,8 @@ <h3 id=descendant-combinators><span class=secno>13.1. </span> Descendant
31403150
<code>h1</code> element. It is a correct and valid, but partial,
31413151
description of the following fragment:</p>
31423152

3143-
<pre>&lt;h1&gt;This &lt;span class="myclass"&gt;headline
3153+
<pre>
3154+
&lt;h1&gt;This &lt;span class="myclass"&gt;headline
31443155
is &lt;em&gt;very&lt;/em&gt; important&lt;/span&gt;&lt;/h1&gt;</pre>
31453156

31463157
<p>The following selector:</p>
@@ -3238,7 +3249,8 @@ <h3 id=general-sibling-combinators><span class=secno>13.4. </span>
32383249
<p>represents a <code>pre</code> element following an <code>h1</code>. It
32393250
is a correct and valid, but partial, description of:</p>
32403251

3241-
<pre>&lt;h1&gt;Definition of the function a&lt;/h1&gt;
3252+
<pre>
3253+
&lt;h1&gt;Definition of the function a&lt;/h1&gt;
32423254
&lt;p&gt;Function a(x) has to be applied to all figures in the table.&lt;/p&gt;
32433255
&lt;pre&gt;function a(x) = 12x/13.5&lt;/pre&gt;</pre>
32443256
</div>
@@ -3385,7 +3397,8 @@ <h2 id=specificity><span class=secno>15. </span> Calculating a selector's
33853397
<div class=example>
33863398
<p>Examples:</p>
33873399

3388-
<pre>* /* a=0 b=0 c=0 -&gt; specificity = 0 */
3400+
<pre>
3401+
* /* a=0 b=0 c=0 -&gt; specificity = 0 */
33893402
LI /* a=0 b=0 c=1 -&gt; specificity = 1 */
33903403
UL LI /* a=0 b=0 c=2 -&gt; specificity = 2 */
33913404
UL OL+LI /* a=0 b=0 c=3 -&gt; specificity = 3 */
@@ -3519,7 +3532,8 @@ <h3 id=lex><span class=secno>16.2. </span> Lexical scanner</h3>
35193532
point in Unicode/ISO-10646. <a href="#UNICODE"
35203533
rel=biblioentry>[UNICODE]<!--{{!UNICODE}}--></a>
35213534

3522-
<pre>%option case-insensitive
3535+
<pre>
3536+
%option case-insensitive
35233537

35243538
ident [-]?{nmstart}{nmchar}*
35253539
name {nmchar}+

selectors4/Overview.src.html

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,8 @@ <h4 id="typenmsp">
925925
<div class="example">
926926
<p>CSS examples:</p>
927927

928-
<pre>@namespace foo url(http://www.example.com);
928+
<pre>
929+
@namespace foo url(http://www.example.com);
929930
foo|h1 { color: blue } /* first rule */
930931
foo|* { color: yellow } /* second rule */
931932
|h1 { color: red } /* ...*/
@@ -1193,7 +1194,8 @@ <h3 id="attrnmsp">
11931194

11941195
<div class="example">
11951196
<p>CSS examples:</p>
1196-
<pre>@namespace foo "http://www.example.com";
1197+
<pre>
1198+
@namespace foo "http://www.example.com";
11971199
[foo|att=val] { color: blue }
11981200
[*|att] { color: yellow }
11991201
[|att] { color: green }
@@ -1301,7 +1303,8 @@ <h3 id="class-html">
13011303
<p>Given these rules, the first <code>H1</code> instance below would not have
13021304
green text, while the second would:</p>
13031305

1304-
<pre>&lt;H1&gt;Not green&lt;/H1&gt;
1306+
<pre>
1307+
&lt;H1&gt;Not green&lt;/H1&gt;
13051308
&lt;H1 class="pastoral"&gt;Very green&lt;/H1&gt;</pre>
13061309

13071310
<p>The following rule matches any <code>P</code> element whose <code>class</code>
@@ -1538,7 +1541,8 @@ <h3 id="target-pseudo">
15381541
<p>CSS example:</p>
15391542
<p>Here, the <code>:target</code> pseudo-class is used to make the
15401543
target element red and place an image before it, if there is one:</p>
1541-
<pre>*:target { color : red }
1544+
<pre>
1545+
*:target { color : red }
15421546
*:target::before { content : url(target.png) }</pre>
15431547
</div>
15441548

@@ -1812,7 +1816,8 @@ <h3 id="lang-pseudo">
18121816
the BODY and the P match <code>:lang(fr)</code> (because both are in
18131817
French). The P does not match the <code>[lang|=fr]</code> because it
18141818
does not have a LANG attribute.</p>
1815-
<pre>&lt;body lang=fr>
1819+
<pre>
1820+
&lt;body lang=fr>
18161821
&lt;p>Je suis fran&ccedil;ais.&lt;/p>
18171822
&lt;/body></pre>
18181823
</div>
@@ -2034,7 +2039,8 @@ <h3 id="nth-child-pseudo">
20342039

20352040
<div class="example">
20362041
<p>Examples:</p>
2037-
<pre>:nth-child(10n-1) /* represents the 9th, 19th, 29th, etc, element */
2042+
<pre>
2043+
:nth-child(10n-1) /* represents the 9th, 19th, 29th, etc, element */
20382044
:nth-child(10n+9) /* Same */
20392045
:nth-child(10n+-1) /* Syntactically invalid, and would be ignored */</pre>
20402046
</div>
@@ -2218,18 +2224,21 @@ <h3 id="first-child-pseudo">
22182224
<pre>div &gt; p:first-child</pre>
22192225
<p>This selector can represent the <code>p</code> inside the
22202226
<code>div</code> of the following fragment:</p>
2221-
<pre>&lt;p&gt; The last P before the note.&lt;/p&gt;
2227+
<pre>
2228+
&lt;p&gt; The last P before the note.&lt;/p&gt;
22222229
&lt;div class="note"&gt;
22232230
&lt;p&gt; The first P inside the note.&lt;/p&gt;
22242231
&lt;/div&gt;</pre>but cannot represent the second <code>p</code> in the following
22252232
fragment:
2226-
<pre>&lt;p&gt; The last P before the note.&lt;/p&gt;
2233+
<pre>
2234+
&lt;p&gt; The last P before the note.&lt;/p&gt;
22272235
&lt;div class="note"&gt;
22282236
&lt;h2&gt; Note &lt;/h2&gt;
22292237
&lt;p&gt; The first P inside the note.&lt;/p&gt;
22302238
&lt;/div&gt;</pre>
22312239
<p>The following two selectors are usually equivalent:</p>
2232-
<pre>* &gt; a:first-child /* a is first child of any element */
2240+
<pre>
2241+
* &gt; a:first-child /* a is first child of any element */
22332242
a:first-child /* Same (assuming a is not the root element) */</pre>
22342243
</div>
22352244

@@ -2262,7 +2271,8 @@ <h3 id="first-of-type-pseudo">
22622271
<pre>dl dt:first-of-type</pre>
22632272
<p>It is a valid description for the first two <code>dt</code>
22642273
elements in the following example but not for the third one:</p>
2265-
<pre>&lt;dl&gt;
2274+
<pre>
2275+
&lt;dl&gt;
22662276
&lt;dt&gt;gigogne&lt;/dt&gt;
22672277
&lt;dd&gt;
22682278
&lt;dl&gt;
@@ -2353,7 +2363,8 @@ <h3 id="descendant-combinators">
23532363
<p>It represents an <code>em</code> element being the descendant of
23542364
an <code>h1</code> element. It is a correct and valid, but partial,
23552365
description of the following fragment:</p>
2356-
<pre>&lt;h1&gt;This &lt;span class="myclass"&gt;headline
2366+
<pre>
2367+
&lt;h1&gt;This &lt;span class="myclass"&gt;headline
23572368
is &lt;em&gt;very&lt;/em&gt; important&lt;/span&gt;&lt;/h1&gt;</pre>
23582369
<p>The following selector:</p>
23592370
<pre>div * p</pre>
@@ -2438,7 +2449,8 @@ <h3 id="general-sibling-combinators">
24382449
<pre>h1 ~ pre</pre>
24392450
<p>represents a <code>pre</code> element following an <code>h1</code>. It
24402451
is a correct and valid, but partial, description of:</p>
2441-
<pre>&lt;h1&gt;Definition of the function a&lt;/h1&gt;
2452+
<pre>
2453+
&lt;h1&gt;Definition of the function a&lt;/h1&gt;
24422454
&lt;p&gt;Function a(x) has to be applied to all figures in the table.&lt;/p&gt;
24432455
&lt;pre&gt;function a(x) = 12x/13.5&lt;/pre&gt;</pre>
24442456
</div>
@@ -2580,7 +2592,8 @@ <h2 id="specificity">
25802592

25812593
<div class="example">
25822594
<p>Examples:</p>
2583-
<pre>* /* a=0 b=0 c=0 -&gt; specificity = 0 */
2595+
<pre>
2596+
* /* a=0 b=0 c=0 -&gt; specificity = 0 */
25842597
LI /* a=0 b=0 c=1 -&gt; specificity = 1 */
25852598
UL LI /* a=0 b=0 c=2 -&gt; specificity = 2 */
25862599
UL OL+LI /* a=0 b=0 c=3 -&gt; specificity = 3 */
@@ -2713,7 +2726,8 @@ <h3 id="lex">
27132726
should be read as "\4177777" (decimal 1114111), which is the highest
27142727
possible code point in Unicode/ISO-10646. [[!UNICODE]]</p>
27152728

2716-
<pre>%option case-insensitive
2729+
<pre>
2730+
%option case-insensitive
27172731

27182732
ident [-]?{nmstart}{nmchar}*
27192733
name {nmchar}+

0 commit comments

Comments
 (0)