Skip to content

Commit 13ef1a5

Browse files
committed
[css-grid] indent all examples properly
1 parent 5f2663f commit 13ef1a5

File tree

1 file changed

+104
-104
lines changed

1 file changed

+104
-104
lines changed

css-grid/Overview.bs

Lines changed: 104 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -453,30 +453,30 @@ Grid Lines</h3>
453453

454454
<pre>
455455
&lt;style type="text/css">
456-
#grid {
456+
#grid {
457457
display: grid;
458458
grid-template-columns: 150px 1fr;
459459
grid-template-rows: 50px 1fr 50px
460-
}
460+
}
461461

462-
#item1 { grid-column: 2;
463-
grid-row-start: 1; grid-row-end: 4; }
462+
#item1 { grid-column: 2;
463+
grid-row-start: 1; grid-row-end: 4; }
464464
&lt;/style>
465465
</pre>
466466

467467
<pre>
468468
&lt;style type="text/css">
469-
/* equivalent layout to the prior example, but using named lines */
470-
#grid {
469+
/* equivalent layout to the prior example, but using named lines */
470+
#grid {
471471
display: grid;
472472
grid-template-columns: 150px (item1-start) 1fr (item1-end);
473473
grid-template-rows: (item1-start) 50px 1fr 50px (item1-end);
474-
}
474+
}
475475

476-
#item1 {
476+
#item1 {
477477
grid-column: item1-start / item1-end;
478478
grid-row: item1-start / item1-end
479-
}
479+
}
480480
&lt;/style>
481481
</pre>
482482
</div>
@@ -496,25 +496,25 @@ Grid Areas</h3>
496496
<div class="example">
497497
<pre>
498498
&lt;style type="text/css">
499-
/* using the template syntax */
500-
#grid {
501-
display: grid;
502-
grid-template-areas: ". a"
503-
"b a"
504-
". a";
505-
grid-template-columns: 150px 1fr;
506-
grid-template-rows: 50px 1fr 50px
507-
}
508-
509-
#item1 { grid-area: a }
510-
#item2 { grid-area: b }
511-
#item3 { grid-area: b }
512-
513-
/* Align items 2 and 3 at different points in the Grid Area "b". */
514-
/* By default, Grid Items are stretched to fit their Grid Area */
515-
/* and these items would layer one over the other. */
516-
#item2 { align-self: start }
517-
#item3 { justify-self: end; align-self: end }
499+
/* using the template syntax */
500+
#grid {
501+
display: grid;
502+
grid-template-areas: ". a"
503+
"b a"
504+
". a";
505+
grid-template-columns: 150px 1fr;
506+
grid-template-rows: 50px 1fr 50px
507+
}
508+
509+
#item1 { grid-area: a }
510+
#item2 { grid-area: b }
511+
#item3 { grid-area: b }
512+
513+
/* Align items 2 and 3 at different points in the Grid Area "b". */
514+
/* By default, Grid Items are stretched to fit their Grid Area */
515+
/* and these items would layer one over the other. */
516+
#item2 { align-self: start }
517+
#item3 { justify-self: end; align-self: end }
518518
&lt;/style>
519519
</pre>
520520
</div>
@@ -780,25 +780,25 @@ Z-axis Ordering: the 'z-index' property</h3>
780780

781781
<pre>
782782
&lt;style type="text/css">
783-
#grid {
783+
#grid {
784784
display: grid;
785785
grid-template-columns: 1fr 1fr;
786786
grid-template-rows: 1fr 1fr
787-
}
788-
#A { grid-column: 1 / span 2; grid-row: 2; align-self: end; }
789-
#B { grid-column: 1; grid-row: 1; z-index: 10; }
790-
#C { grid-column: 2; grid-row: 1; align-self: start; margin-left: -20px; }
791-
#D { grid-column: 2; grid-row: 2; justify-self: end; align-self: start; }
792-
#E { grid-column: 1 / span 2; grid-row: 1 / span 2;
793-
z-index: 5; justify-self: center; align-self: center; }
787+
}
788+
#A { grid-column: 1 / span 2; grid-row: 2; align-self: end; }
789+
#B { grid-column: 1; grid-row: 1; z-index: 10; }
790+
#C { grid-column: 2; grid-row: 1; align-self: start; margin-left: -20px; }
791+
#D { grid-column: 2; grid-row: 2; justify-self: end; align-self: start; }
792+
#E { grid-column: 1 / span 2; grid-row: 1 / span 2;
793+
z-index: 5; justify-self: center; align-self: center; }
794794
&lt;/style>
795795

796796
&lt;div id="grid">
797-
&lt;div id="A">A&lt;/div>
798-
&lt;div id="B">B&lt;/div>
799-
&lt;div id="C">C&lt;/div>
800-
&lt;div id="D">D&lt;/div>
801-
&lt;div id="E">E&lt;/div>
797+
&lt;div id="A">A&lt;/div>
798+
&lt;div id="B">B&lt;/div>
799+
&lt;div id="C">C&lt;/div>
800+
&lt;div id="D">D&lt;/div>
801+
&lt;div id="E">E&lt;/div>
802802
&lt;/div>
803803
</pre>
804804
</div>
@@ -1009,11 +1009,11 @@ Named Grid Lines: the <css>(<<custom-ident>>*)</css> syntax</h4>
10091009

10101010
<pre>
10111011
&lt;style>
1012-
#grid {
1012+
#grid {
10131013
display: grid;
10141014
grid-template-columns: (first nav) 150px (main) 1fr (last);
10151015
grid-template-rows: (first header) 50px (main) 1fr (footer) 50px (last);
1016-
}
1016+
}
10171017
&lt;/style>
10181018
</pre>
10191019

@@ -1067,21 +1067,21 @@ Repeating Rows and Columns: the ''repeat()'' notation</h4>
10671067

10681068
<pre>
10691069
&lt;style>
1070-
#grid {
1070+
#grid {
10711071
display: grid;
10721072
grid-template-columns: 10px (col-start) 250px (col-end)
1073-
10px (col-start) 250px (col-end)
1074-
10px (col-start) 250px (col-end)
1075-
10px (col-start) 250px (col-end) 10px;
1073+
10px (col-start) 250px (col-end)
1074+
10px (col-start) 250px (col-end)
1075+
10px (col-start) 250px (col-end) 10px;
10761076
grid-template-rows: 1fr;
1077-
}
1077+
}
10781078

1079-
/* Equivalent definition. */
1080-
#grid {
1079+
/* Equivalent definition. */
1080+
#grid {
10811081
display: grid;
10821082
grid-template-columns: repeat(4, 10px (col-start) 250px (col-end)) 10px;
10831083
grid-template-rows: 1fr;
1084-
}
1084+
}
10851085
&lt;/style>
10861086
</pre>
10871087
</div>
@@ -1326,14 +1326,14 @@ Resolved Values</h4>
13261326
<div class="example">
13271327
<pre>
13281328
&lt;style>
1329-
#grid {
1329+
#grid {
13301330
width: 500px;
13311331
grid-template-columns:
13321332
(a) auto
13331333
(b) minmax(min-content, 1fr)
13341334
(b c d) repeat(2, (e) 40px)
1335-
repeat(5, auto);
1336-
}
1335+
repeat(5, auto);
1336+
}
13371337
&lt;/style>
13381338
&lt;div id="grid">
13391339
&lt;div style="grid-column-start:1; width:50px">&lt;/div>
@@ -1462,16 +1462,16 @@ Named Areas: the 'grid-template-areas' property</h3>
14621462

14631463
<pre>
14641464
&lt;style type="text/css">
1465-
#grid {
1465+
#grid {
14661466
display: grid;
14671467
grid-template-areas: "head head"
1468-
"nav main"
1469-
"foot . "
1470-
}
1471-
#grid > header { grid-area: head; }
1472-
#grid > nav { grid-area: nav; }
1473-
#grid > main { grid-area: main; }
1474-
#grid > footer { grid-area: foot; }
1468+
"nav main"
1469+
"foot . "
1470+
}
1471+
#grid > header { grid-area: head; }
1472+
#grid > nav { grid-area: nav; }
1473+
#grid > main { grid-area: main; }
1474+
#grid > footer { grid-area: foot; }
14751475
&lt;/style>
14761476
</pre>
14771477
</div>
@@ -1765,78 +1765,78 @@ Sizing Auto-generated Rows and Columns: the 'grid-auto-rows' and 'grid-auto-colu
17651765

17661766
<pre>
17671767
&lt;style type="text/css">
1768-
form {
1768+
form {
17691769
display: grid;
17701770
/* Define three columns, all content-sized,
17711771
and name the corresponding lines. */
17721772
grid-template-columns: (labels) auto (controls) auto (oversized) auto;
17731773
grid-auto-flow: row;
1774-
}
1775-
form > label {
1774+
}
1775+
form > label {
17761776
/* Place all labels in the "labels" column and
17771777
automatically find the next available row. */
17781778
grid-column: labels;
17791779
grid-row: auto;
1780-
}
1781-
form > input, form > select {
1780+
}
1781+
form > input, form > select {
17821782
/* Place all controls in the "controls" column and
17831783
automatically find the next available row. */
17841784
grid-column: controls;
17851785
grid-row: auto;
1786-
}
1786+
}
17871787

1788-
#department {
1788+
#department {
17891789
/* Auto place this item in the "oversized" column
17901790
in the first row where an area that spans three rows
17911791
won't overlap other explicitly placed items or areas
17921792
or any items automatically placed prior to this area. */
17931793
grid-column: oversized;
17941794
grid-row: span 3;
1795-
}
1795+
}
17961796

1797-
/* Place all the buttons of the form
1798-
in the explicitly defined grid area. */
1799-
#buttons {
1797+
/* Place all the buttons of the form
1798+
in the explicitly defined grid area. */
1799+
#buttons {
18001800
grid-row: auto;
18011801

18021802
/* Ensure the button area spans the entire grid element
18031803
in the row axis. */
18041804
grid-column: 1 / -1;
18051805
text-align: end;
1806-
}
1806+
}
18071807
&lt;/style>
18081808
&lt;form>
1809-
&lt;label for="firstname">First name:&lt;/label>
1810-
&lt;input type="text" id="firstname" name="firstname" />
1811-
&lt;label for="lastname">Last name:&lt;/label>
1812-
&lt;input type="text" id="lastname" name="lastname" />
1813-
&lt;label for="address">Address:&lt;/label>
1814-
&lt;input type="text" id="address" name="address" />
1815-
&lt;label for="address2">Address 2:&lt;/label>
1816-
&lt;input type="text" id="address2" name="address2" />
1817-
&lt;label for="city">City:&lt;/label>
1818-
&lt;input type="text" id="city" name="city" />
1819-
&lt;label for="state">State:&lt;/label>
1820-
&lt;select type="text" id="state" name="state">
1821-
&lt;option value="WA">Washington&lt;/option>
1822-
&lt;/select>
1823-
&lt;label for="zip">Zip:&lt;/label>
1824-
&lt;input type="text" id="zip" name="zip" />
1825-
1826-
&lt;div id="department">
1827-
&lt;label for="department">Department:&lt;/label>
1828-
&lt;select id="department" name="department" multiple>
1829-
&lt;option value="finance">Finance&lt;/option>
1830-
&lt;option value="humanresources">Human Resources&lt;/option>
1831-
&lt;option value="marketing">Marketing&lt;/option>
1809+
&lt;label for="firstname">First name:&lt;/label>
1810+
&lt;input type="text" id="firstname" name="firstname" />
1811+
&lt;label for="lastname">Last name:&lt;/label>
1812+
&lt;input type="text" id="lastname" name="lastname" />
1813+
&lt;label for="address">Address:&lt;/label>
1814+
&lt;input type="text" id="address" name="address" />
1815+
&lt;label for="address2">Address 2:&lt;/label>
1816+
&lt;input type="text" id="address2" name="address2" />
1817+
&lt;label for="city">City:&lt;/label>
1818+
&lt;input type="text" id="city" name="city" />
1819+
&lt;label for="state">State:&lt;/label>
1820+
&lt;select type="text" id="state" name="state">
1821+
&lt;option value="WA">Washington&lt;/option>
18321822
&lt;/select>
1833-
&lt;/div>
1834-
1835-
&lt;div id="buttons">
1836-
&lt;button id="cancel">Cancel&lt;/button>
1837-
&lt;button id="back">Back&lt;/button>
1838-
&lt;button id="next">Next&lt;/button>
1839-
&lt;/div>
1823+
&lt;label for="zip">Zip:&lt;/label>
1824+
&lt;input type="text" id="zip" name="zip" />
1825+
1826+
&lt;div id="department">
1827+
&lt;label for="department">Department:&lt;/label>
1828+
&lt;select id="department" name="department" multiple>
1829+
&lt;option value="finance">Finance&lt;/option>
1830+
&lt;option value="humanresources">Human Resources&lt;/option>
1831+
&lt;option value="marketing">Marketing&lt;/option>
1832+
&lt;/select>
1833+
&lt;/div>
1834+
1835+
&lt;div id="buttons">
1836+
&lt;button id="cancel">Cancel&lt;/button>
1837+
&lt;button id="back">Back&lt;/button>
1838+
&lt;button id="next">Next&lt;/button>
1839+
&lt;/div>
18401840
&lt;/form>
18411841
</pre>
18421842
</div>

0 commit comments

Comments
 (0)