mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:17:35 +00:00
LibWeb: Use containing block width to measure fit-content width in GFC
When the grid layout gets to `resolve_items_box_metrics(GridDimension::Column)`, we've already determined the width of each column. However, the widths of the individual grid items themselves haven't been set. Rather than using `get_available_space_for_item()`, which returns an indefinite size if an item's width/height hasn't been set, we should use the already known track width as the available size to calculate the fit-content width.
This commit is contained in:
parent
e1a9d7ec9d
commit
d3d67857b2
3 changed files with 44 additions and 2 deletions
|
@ -0,0 +1,13 @@
|
|||
<!doctype html><style>
|
||||
* {
|
||||
outline: 1px solid black;
|
||||
}
|
||||
body {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
}
|
||||
div {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(12, minmax(0px, 1fr));
|
||||
}
|
||||
</style><body><div>Making Commerce Better for Everyone
|
Loading…
Add table
Add a link
Reference in a new issue