mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:27:43 +00:00
LibWeb: Use grid item used width as available width during track sizing
This change addresses the incorrect assumption that the available width inside a grid item is equal to the width of the track it belongs to. For instance, if a grid item has a width of 200px, the available width inside that item is also 200px regardless of its column(s) base size. To solve this issue, it was necessary to move the final resolution of grid items to occur immediately after the final column track sizes are determined. By doing so, it becomes possible to obtain correct available width inside grid items while resolving the row track sizes.
This commit is contained in:
parent
52e9dced1a
commit
82aedfcaf0
12 changed files with 136 additions and 39 deletions
|
@ -0,0 +1,16 @@
|
|||
<style>
|
||||
.container {
|
||||
display: grid;
|
||||
grid-template-columns: 200px;
|
||||
background-color: pink;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.item {
|
||||
width: 50%;
|
||||
background-color: palevioletred;
|
||||
}
|
||||
</style>
|
||||
<div class="container"><div class="item">
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus eget turpis eget urna
|
||||
feugiat pretium ut eu ante. Nunc sed pharetra diam, rutrum lacinia tellus.</div></div>
|
Loading…
Add table
Add a link
Reference in a new issue