1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 07:57:46 +00:00

LibWeb: Respect "auto flow" property in grid layout

Before this change, we only considering `grid-auto-flow` to determine
whether a row or column should be added when there was not enough space
in the implicit grid to fit the next unplaced item.

Now, we also choose the direction in which the "auto placement cursor"
is moved, based on the auto flow property.
This commit is contained in:
Aliaksandr Kalenik 2024-03-04 14:04:15 +01:00 committed by Andreas Kling
parent f9f98016e2
commit 4d8bc16812
14 changed files with 363 additions and 42 deletions

View file

@ -0,0 +1,12 @@
<!DOCTYPE html><style>
.grid {
display: grid;
grid-template-rows: 100px 100px;
grid-template-columns: 100px 100px;
grid-auto-flow: row;
}
* {
border: 1px solid black;
}
</style><body><div class="grid"><div id="a">1</div><div id="b">2</div><div id="a">3</div><div id="b">4</div></div></body>