mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 08:57:47 +00:00
LibWeb: Resolve grid item fixed size paddings in GFC
Adds support for grid items with fixed size paddings. Supporting percentage paddings will probably require to do second pass of tracks layout: second pass is needed to recalculate tracks sizes when final items sizes are known when percentage paddings are already resolved.
This commit is contained in:
parent
f8d6569841
commit
902ceb1675
4 changed files with 84 additions and 21 deletions
22
Tests/LibWeb/Layout/input/grid/grid-item-fixed-paddings.html
Normal file
22
Tests/LibWeb/Layout/input/grid/grid-item-fixed-paddings.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
<style>
|
||||
.grid-container {
|
||||
display: grid;
|
||||
grid-template-columns: min-content min-content;
|
||||
grid-template-rows: auto;
|
||||
grid-gap: 50px;
|
||||
}
|
||||
|
||||
.grid-item {
|
||||
background-color: #ddd;
|
||||
padding: 50px;
|
||||
text-align: center;
|
||||
font-size: 30px;
|
||||
border: 10px solid black;
|
||||
}
|
||||
</style>
|
||||
<div class="grid-container">
|
||||
<div class="grid-item">1</div>
|
||||
<div class="grid-item">2</div>
|
||||
<div class="grid-item">3</div>
|
||||
<div class="grid-item">4</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue