Files
ladybird/Tests/LibWeb/Layout/input/grid/abspos-item-with-grid-area-aligned-in-center.html
Aliaksandr Kalenik 805b0fed13 LibWeb: Use grid area size for abspos grid items alignment
Fixes yet another case of GFC bug, where Node::containing_block() should
not be used for grid items, because their containing block is grid area
which is not represented in layout tree.
2024-09-17 07:51:50 +02:00

26 lines
537 B
HTML

<!DOCTYPE html><style>
* {
border: 1px solid black;
}
.grid {
display: grid;
grid-template-columns: 100px 100px;
grid-template-rows: 100px 100px;
grid-template-areas: "a b"
"c c";
position: relative;
width: 200px;
}
.abspos-item {
position: absolute;
box-sizing: border-box;
background-color: magenta;
width: 50px;
height: 50px;
grid-area: b;
align-self: center;
justify-self: center;
}
</style><div class="grid"><div class="abspos-item"></div></div>