mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:27:35 +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:
parent
775742b35d
commit
1c979e0ed7
4 changed files with 68 additions and 18 deletions
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue