Skip to content

Commit 1eda68e

Browse files
committed
Tweak example styling.
1 parent 9ddebf4 commit 1eda68e

5 files changed

Lines changed: 11 additions & 11 deletions

File tree

cssom-view/Overview.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ <h2 id="extensions-to-the-element-interface"><span class="secno">6 </span>Extens
500500
<dt class="method" id="widl-Element-getBoundingClientRect-ClientRect">
501501
<code>getBoundingClientRect</code> (), returns <span class="idlMethType"><a>ClientRect</a></span></dt>
502502
<dd>
503-
<p>The <code>getBoundingClientRect</code> operation, when invoked, must return the result of the following algorithm:</p> <ol> <li><p>Let <var>list</var> be the result of invoking <code title="dom-Element-getClientRects">getClientRects()</code> on the same element this method was invoked on.</li> <li><p>If the <var>list</var> is empty return a <code>ClientRect</code> object whose <code title="dom-ClientRect-top">top</code>, <code title="dom-ClientRect-right">right</code>, <code title="dom-ClientRect-bottom">bottom</code> and <code title="dom-ClientRect-left">left</code> members are zero.</li> <li><p>Otherwise, return a <code>ClientRect</code> object describing the smallest rectangle that includes the first rectangle in <var>list</var> and all of the remaining rectangles of which the height or width is not zero.</li> </ol> <div class="example"> <p>The following snippet gets the dimensions of the first <code>div</code> element in a document:</p> <pre class="example"><code>var example = document.getElementsByTagName("div")[0].getBoundingClientRect();
503+
<p>The <code>getBoundingClientRect</code> operation, when invoked, must return the result of the following algorithm:</p> <ol> <li><p>Let <var>list</var> be the result of invoking <code title="dom-Element-getClientRects">getClientRects()</code> on the same element this method was invoked on.</li> <li><p>If the <var>list</var> is empty return a <code>ClientRect</code> object whose <code title="dom-ClientRect-top">top</code>, <code title="dom-ClientRect-right">right</code>, <code title="dom-ClientRect-bottom">bottom</code> and <code title="dom-ClientRect-left">left</code> members are zero.</li> <li><p>Otherwise, return a <code>ClientRect</code> object describing the smallest rectangle that includes the first rectangle in <var>list</var> and all of the remaining rectangles of which the height or width is not zero.</li> </ol> <div class="example"> <p>The following snippet gets the dimensions of the first <code>div</code> element in a document:</p> <pre><code>var example = document.getElementsByTagName("div")[0].getBoundingClientRect();
504504
var exampleWidth = example.width;
505505
var exampleHeight = example.height;</code></pre> </div></dd>
506506
<dt class="method" id="widl-Element-scrollIntoView-void-boolean-top">

cssom-view/idl/Element.idl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ partial interface Element {
5353
<div class='example'>\
5454
<p>The following snippet gets the dimensions of the first\
5555
<code>div</code> element in a document:</p>\
56-
<pre class='example'><code>var example = document.getElementsByTagName(&quot;div&quot;)[0].getBoundingClientRect();&#xA;\
56+
<pre><code>var example = document.getElementsByTagName(&quot;div&quot;)[0].getBoundingClientRect();&#xA;\
5757
var exampleWidth = example.width;&#xA;\
5858
var exampleHeight = example.height;</code></pre>\
5959
</div>"

cssom/Overview.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,7 @@ <h4 id="examples"><span class="secno">6.2.5 </span>Examples</h4>
12281228
<div class="example">
12291229
<p>Thus, in the following HTML snippet:</p>
12301230

1231-
<pre class="example">&lt;link rel="alternate stylesheet" title="foo" href="a"&gt;
1231+
<pre>&lt;link rel="alternate stylesheet" title="foo" href="a"&gt;
12321232
&lt;link rel="alternate stylesheet" title="bar" href="b"&gt;
12331233
&lt;script&gt;
12341234
document.selectedStyleSheetSet = 'foo';
@@ -1248,7 +1248,7 @@ <h4 id="examples"><span class="secno">6.2.5 </span>Examples</h4>
12481248

12491249
<p>Similarly, in the following HTML snippet:</p>
12501250

1251-
<pre class="example">&lt;link rel="alternate stylesheet" title="foo" href="a"&gt;
1251+
<pre>&lt;link rel="alternate stylesheet" title="foo" href="a"&gt;
12521252
&lt;link rel="alternate stylesheet" title="bar" href="b"&gt;
12531253
&lt;script&gt;
12541254
var before = document.preferredStyleSheetSet;
@@ -1321,7 +1321,7 @@ <h4 id="the-linkstyle-interface"><span class="secno">6.3.1 </span>The <code>Link
13211321
(Assuming the user agent supports CSS (<code>text/css</code>) and does
13221322
not support ExampleSheets (<code>text/example-sheets</code>).</p>
13231323

1324-
<pre class="example">&lt;style type=text/css&gt; body { background:lime } &lt;/style&gt;
1324+
<pre>&lt;style type=text/css&gt; body { background:lime } &lt;/style&gt;
13251325
&lt;style type=text/example-sheets&gt; $(body).background := lime &lt;/style&gt;</pre>
13261326
</div>
13271327

cssom/cssom-source

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@
10211021
<div class="example">
10221022
<p>Thus, in the following HTML snippet:</p>
10231023

1024-
<pre class="example">&lt;link rel="alternate stylesheet" title="foo" href="a"&gt;
1024+
<pre>&lt;link rel="alternate stylesheet" title="foo" href="a"&gt;
10251025
&lt;link rel="alternate stylesheet" title="bar" href="b"&gt;
10261026
&lt;script&gt;
10271027
document.selectedStyleSheetSet = 'foo';
@@ -1041,7 +1041,7 @@
10411041

10421042
<p>Similarly, in the following HTML snippet:</p>
10431043

1044-
<pre class="example">&lt;link rel="alternate stylesheet" title="foo" href="a"&gt;
1044+
<pre>&lt;link rel="alternate stylesheet" title="foo" href="a"&gt;
10451045
&lt;link rel="alternate stylesheet" title="bar" href="b"&gt;
10461046
&lt;script&gt;
10471047
var before = document.preferredStyleSheetSet;
@@ -1104,7 +1104,7 @@
11041104
(Assuming the user agent supports CSS (<code>text/css</code>) and does
11051105
not support ExampleSheets (<code>text/example-sheets</code>).</p>
11061106

1107-
<pre class="example">&lt;style type=text/css> body { background:lime } &lt;/style>
1107+
<pre>&lt;style type=text/css> body { background:lime } &lt;/style>
11081108
&lt;style type=text/example-sheets> $(body).background := lime &lt;/style></pre>
11091109
</div>
11101110

cssom/cssom.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ code {
5252

5353

5454
/* --- EXAMPLES --- */
55-
pre.example {
55+
.example {
5656
border-top: 1px solid #ff4500;
5757
border-bottom: 1px solid #ff4500;
5858
padding: 1em;
59-
margin-top: 1em;
59+
margin: 2em 0;
6060
}
6161

62-
pre.example::before {
62+
.example::before {
6363
content: "Example";
6464
display: block;
6565
width: 150px;

0 commit comments

Comments
 (0)