mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 07:27:45 +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:
parent
f9f98016e2
commit
4d8bc16812
14 changed files with 363 additions and 42 deletions
12
Tests/LibWeb/Layout/input/grid/placement-5.html
Normal file
12
Tests/LibWeb/Layout/input/grid/placement-5.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html><style>
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-rows: 100px 100px;
|
||||
grid-template-columns: 100px 100px;
|
||||
grid-auto-flow: column;
|
||||
}
|
||||
|
||||
* {
|
||||
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>
|
Loading…
Add table
Add a link
Reference in a new issue