Files
ladybird/Tests/LibWeb/Layout/input/grid/abspos-item-contained-by-grid-area.html
Aliaksandr Kalenik 80c8e787a8 LibWeb: Fix abspos layout when box is contained by grid area
Before this change, `layout_absolutely_positioned_element()` in GFC
had an assumption that all contained by grid container abspos boxes were
also direct children of the grid container. This change adds handling
for the cases when it's not true and, in order to identify grid area
abspos box belongs to, we have to find ancestor grid item.
2025-08-17 17:58:16 +02:00

19 lines
532 B
HTML

<!DOCTYPE html><style>
.gfc {
display: grid;
grid-template-columns: 1fr [right-start] 1fr [grid-end];
position: absolute;
width: 100%;
height: 100%;
background-color: lightpink;
}
.grid-item {
grid-column: right-start/grid-end;
background-color: magenta;
}
.abspos {
position: absolute;
width: 100px;
background-color: orange;
}
</style><div class="gfc"><div class="grid-item"><div class="abspos">Hello</div></div></div>