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

LibWeb: Resolve percentage padding and margins for grid items in GFC

Adds a second pass to resolve percentage paddings and margins of grid
items after track sizes are known. If resolving percentage paddings
or margins affects tracks sizes then second pass to re-resolve track
sizes might also be needed but I cannot come up with an example to
reproduce that so we can leave it to improve in the future :)
This commit is contained in:
Aliaksandr Kalenik 2023-06-08 02:49:30 +03:00 committed by Andreas Kling
parent 775742b35d
commit 1c979e0ed7
4 changed files with 68 additions and 18 deletions

View file

@ -0,0 +1,12 @@
<style>
.grid {
display: grid;
background-color: lightgreen;
}
.item {
background-color: lightpink;
margin: 0 20%;
padding: 0 10%;
}
</style><div><div class="grid"><div class="item">A filthy t-shirt