Skip to content

Commit c2f3691

Browse files
committed
[css-grid] Yay, syntax highlighting works now
--HG-- extra : rebase_source : ebf531a8a8035a9421f9279033fd97dcce1d8fc4
1 parent 2e5c46c commit c2f3691

2 files changed

Lines changed: 658 additions & 37 deletions

File tree

css-grid/Overview.bs

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ Adapting Layouts to Available Space</h3>
154154
using the 'grid-template-rows' and 'grid-template-columns' properties on the <a>grid container</a>,
155155
and the 'grid-row' and 'grid-column' properties on each <a>grid item</a>.
156156

157-
<pre class="example">
158-
&lt;style type="text/css">
159-
#grid {
157+
<div class="example">
158+
<pre class="lang-css">
159+
#grid {
160160
display: grid;
161161

162162
/* Two columns: the first sized to content, the second receives
@@ -169,27 +169,30 @@ Adapting Layouts to Available Space</h3>
169169
* row receives the remaining space, but is never smaller than
170170
* the minimum height of the board or stats areas. */
171171
grid-template-rows: auto minmax(min-content, 1fr) auto
172-
}
172+
}
173+
174+
/* Each part of the game is positioned between grid lines by
175+
* referencing the starting grid line and then specifying, if more
176+
* than one, the number of rows or columns spanned to determine
177+
* the ending grid line, which establishes bounds for the part. */
178+
#title { grid-column: 1; grid-row: 1 }
179+
#score { grid-column: 1; grid-row: 3 }
180+
#stats { grid-column: 1; grid-row: 2; justify-self: start }
181+
#board { grid-column: 2; grid-row: 1 / span 2; }
182+
#controls { grid-column: 2; grid-row: 3; align-self: center }
183+
</pre>
173184

174-
/* Each part of the game is positioned between grid lines by
175-
* referencing the starting grid line and then specifying, if more
176-
* than one, the number of rows or columns spanned to determine
177-
* the ending grid line, which establishes bounds for the part. */
178-
#title { grid-column: 1; grid-row: 1 }
179-
#score { grid-column: 1; grid-row: 3 }
180-
#stats { grid-column: 1; grid-row: 2; justify-self: start }
181-
#board { grid-column: 2; grid-row: 1 / span 2; }
182-
#controls { grid-column: 2; grid-row: 3; align-self: center }
183-
&lt;/style>
185+
<pre class="lang-markup">
184186

185-
&lt;div id="grid">
186-
&lt;div id="title">Game Title&lt;/div>
187-
&lt;div id="score">Score&lt;/div>
188-
&lt;div id="stats">Stats&lt;/div>
189-
&lt;div id="board">Board&lt;/div>
190-
&lt;div id="controls">Controls&lt;/div>
191-
&lt;/div>
192-
</pre>
187+
&lt;div id="grid">
188+
&lt;div id="title">Game Title&lt;/div>
189+
&lt;div id="score">Score&lt;/div>
190+
&lt;div id="stats">Stats&lt;/div>
191+
&lt;div id="board">Board&lt;/div>
192+
&lt;div id="controls">Controls&lt;/div>
193+
&lt;/div>
194+
</pre>
195+
</div>
193196

194197
<h3 id='source-independence'>
195198
Source-Order Independence</h3>

0 commit comments

Comments
 (0)