mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +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/
6 lines
97 B
HTML
6 lines
97 B
HTML
<!DOCTYPE html>
|
|
<style>
|
|
div { display: grid; min-height: fit-content; }
|
|
</style>
|
|
<div></div>
|