LibWeb/Layout: Implement justify-content for column spacing in grid

This commit is contained in:
Neil Viloria 2024-10-03 20:35:57 -06:00 committed by Alexander Kalenik
commit 4bda65c8b3
Notes: github-actions[bot] 2024-10-05 17:22:38 +00:00
4 changed files with 317 additions and 39 deletions

View file

@ -0,0 +1,62 @@
<!doctype html><style>
.grid {
width: 100%;
height: 20px;
display: grid;
grid-template-columns: repeat(3, 60px);
background-color: #a8d5ba;
gap: 1rem;
margin-bottom: 20px;
}
.grid > * {
background-color: rebeccapurple;
}
.justify-start { justify-content: start; }
.justify-end { justify-content: end; }
.justify-center { justify-content: center; }
.justify-stretch { justify-content: stretch; }
.justify-space-around { justify-content: space-around; }
.justify-space-between { justify-content: space-between; }
.justify-space-evenly { justify-content: space-evenly; }
</style>
<div class="grid justify-start">
<div></div>
<div></div>
<div></div>
</div>
<div class="grid justify-end">
<div></div>
<div></div>
<div></div>
</div>
<div class="grid justify-center">
<div></div>
<div></div>
<div></div>
</div>
<div class="grid justify-stretch">
<div></div>
<div></div>
<div></div>
</div>
<div class="grid justify-space-around">
<div></div>
<div></div>
<div></div>
</div>
<div class="grid justify-space-between">
<div></div>
<div></div>
<div></div>
</div>
<div class="grid justify-space-evenly">
<div></div>
<div></div>
<div></div>
</div>