mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
Previously, GridFormattingContext handled its own min-height constraints internally, which caused infinite recursion when min-height was an intrinsic sizing keyword (e.g., min-height: max-content). This change moves the responsibility to the parent formatting context (BFC). When any box establishing an independent formatting context has auto height but non-auto min-height: 1. BFC measures content height using a throwaway LayoutState 2. If content height < min-height, BFC passes min-height as definite available height to the child formatting context 3. Child FC runs once with correct constraints, unaware of min-height Fixes https://github.com/LadybirdBrowser/ladybird/issues/4261 which is corresponding to stack overflow on https://claude.ai/
17 lines
279 B
HTML
17 lines
279 B
HTML
<!DOCTYPE html>
|
|
<style>
|
|
.grid {
|
|
display: grid;
|
|
min-height: 200px;
|
|
width: 100px;
|
|
background: lightblue;
|
|
}
|
|
.item {
|
|
height: 50px;
|
|
background: pink;
|
|
}
|
|
</style>
|
|
<div class="grid">
|
|
<div class="item">Item</div>
|
|
</div>
|