Files
ladybird/Tests/LibWeb/Layout/input/grid/stretch-explicit-alignment-fr-tracks.html
Aliaksandr Kalenik ef6829364a LibWeb: Skip intrinsic sizing for stretched grid items
For grid items with auto preferred size, stretch/normal alignment, and
no auto margins, the final size is simply the containing block size
minus margin box sizes. We can compute this directly without calling
`calculate_fit_content_width/height`, which triggers expensive intrinsic
sizing layout passes.
2026-01-08 19:37:14 +01:00

23 lines
515 B
HTML

<!DOCTYPE html>
<style>
* {
border: 1px solid black;
}
.grid {
display: grid;
grid-template-columns: 1fr 2fr;
grid-template-rows: 1fr;
width: 300px;
height: 100px;
align-items: stretch;
justify-items: stretch;
}
.item {
background: lightgreen;
}
</style>
<div class="grid">
<div class="item">stretch both</div>
<div class="item" style="align-self: stretch; justify-self: stretch;">explicit stretch</div>
</div>