Skip to content

Commit 20676b7

Browse files
committed
[css-grid-1][css-grid-2] Add 'display: grid' to examples #11848
1 parent b9036be commit 20676b7

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

css-grid-1/Overview.bs

+7-2
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ Declaring the Grid</h3>
443443
the last row is given a fixed size of ''30px''.
444444
<pre>
445445
main {
446+
display: grid;
446447
grid: "H H "
447448
"A B "
448449
"F F " 30px
@@ -460,10 +461,12 @@ Declaring the Grid</h3>
460461

461462
<pre>
462463
main {
464+
display: grid;
463465
grid: repeat(auto-fill, 5em) / auto-flow 1fr;
464466
height: 100vh;
465467
}
466468
@media print {
469+
display: grid;
467470
main {
468471
grid: auto-flow 1fr / repeat(auto-fill, 5em);
469472
}
@@ -477,8 +480,9 @@ Declaring the Grid</h3>
477480

478481
<pre>
479482
main {
480-
grid: auto 1fr auto / repeat(5, 1fr);
481-
min-height: 100vh;
483+
display: grid;
484+
grid: auto 1fr auto / repeat(5, 1fr);
485+
min-height: 100vh;
482486
}
483487
</pre>
484488
</ul>
@@ -546,6 +550,7 @@ Sizing the Grid</h3>
546550

547551
<pre>
548552
main {
553+
display: grid;
549554
grid: auto-flow 1fr / repeat(auto-fill, 5em);
550555
min-height: 100vh;
551556
justify-content: space-between;

css-grid-2/Overview.bs

+6-2
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,7 @@ Declaring the Grid</h3>
444444
the last row is given a fixed size of ''30px''.
445445
<pre>
446446
main {
447+
display: grid;
447448
grid: "H H "
448449
"A B "
449450
"F F " 30px
@@ -461,6 +462,7 @@ Declaring the Grid</h3>
461462

462463
<pre>
463464
main {
465+
display: grid;
464466
grid: repeat(auto-fill, 5em) / auto-flow 1fr;
465467
height: 100vh;
466468
}
@@ -478,8 +480,9 @@ Declaring the Grid</h3>
478480

479481
<pre>
480482
main {
481-
grid: auto 1fr auto / repeat(5, 1fr);
482-
min-height: 100vh;
483+
display: grid;
484+
grid: auto 1fr auto / repeat(5, 1fr);
485+
min-height: 100vh;
483486
}
484487
</pre>
485488
</ul>
@@ -547,6 +550,7 @@ Sizing the Grid</h3>
547550

548551
<pre>
549552
main {
553+
display: grid;
550554
grid: auto-flow 1fr / repeat(auto-fill, 5em);
551555
min-height: 100vh;
552556
justify-content: space-between;

0 commit comments

Comments
 (0)