mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:27:44 +00:00
67 lines
No EOL
1.7 KiB
HTML
67 lines
No EOL
1.7 KiB
HTML
<style>
|
|
body {
|
|
font-family: 'SerenitySans';
|
|
}
|
|
|
|
.grid-container {
|
|
display: grid;
|
|
background-color: lightsalmon;
|
|
}
|
|
|
|
.grid-item {
|
|
background-color: lightblue;
|
|
}
|
|
</style>
|
|
|
|
<!-- Column end and span -->
|
|
<!-- There should be a column spanning 8 units, and then one spanning 4 -->
|
|
<div class="grid-container" style="
|
|
grid-template-columns: repeat(12,minmax(0,5fr));
|
|
">
|
|
<div class="grid-item" style="
|
|
grid-column-end: span 8;
|
|
">1</div>
|
|
<div class="grid-item" style="
|
|
grid-column-end: span 4;
|
|
">2</div>
|
|
</div>
|
|
|
|
<!-- Column start span takes priority over column end span -->
|
|
<!-- There should be a column spanning 4 units, and then one spanning 8 -->
|
|
<div class="grid-container" style="
|
|
grid-template-columns: repeat(12,minmax(0,5fr));
|
|
">
|
|
<div class="grid-item" style="
|
|
grid-column-start: span 4;
|
|
grid-column-end: span 8;
|
|
">1</div>
|
|
<div class="grid-item" style="
|
|
grid-column-start: span 8;
|
|
grid-column-end: span 4;
|
|
">2</div>
|
|
</div>
|
|
|
|
<!-- Row end and span -->
|
|
<!-- There should be a row spanning 2 units, and then one spanning 3 -->
|
|
<div class="grid-container" style="
|
|
grid-template-rows: repeat(5, 20px);
|
|
">
|
|
<div class="grid-item" style="
|
|
grid-row-end: span 2;
|
|
">1</div>
|
|
<div class="grid-item" style="
|
|
grid-row-end: span 3;
|
|
">2</div>
|
|
</div>
|
|
|
|
<!-- Grid shouldn't expand to 3 columns as having too much span doesn't change size. -->
|
|
<!-- The bottom row should take up half the width of the grid. -->
|
|
<div class="grid-container" style="
|
|
grid-template-columns: 1fr 1fr;
|
|
">
|
|
<div class="grid-item" style="
|
|
grid-column: 1 / span 3;
|
|
grid-row: 1;
|
|
">1</div>
|
|
<div class="grid-item">1</div>
|
|
</div> |