1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:07:47 +00:00

LibWeb: Adjust grid columns size to fit spanning items

This change implements following paragraph from placement algorithm in
the spec:
"If the largest column span among all the items without a definite
column position is larger than the width of the implicit grid, add
columns to the end of the implicit grid to accommodate that column
span."

There were places in the grid implementation code with copies of this
text, but those were completely unrelated to the code where they were
being pasted so I removed them.
This commit is contained in:
Aliaksandr Kalenik 2023-07-13 15:49:07 +02:00 committed by Andreas Kling
parent c0f985ffcf
commit e2c5e31292
4 changed files with 34 additions and 10 deletions

View file

@ -0,0 +1,13 @@
<style>
.container {
width: 300px;
display: grid;
grid-template-columns: 100px;
grid-template-rows: 100px;
}
.item {
background-color: purple;
grid-column: span 2;
}
</style><div class="container"><div class="item"></div></div>