Files
rust_browser/tests/goldens/expected/186-negative-margin-auto-height.layout.txt
Zachary D. Rowitsch 90063566d4 Clamp auto-height to zero when negative margins produce negative content height
CSS 2.1 §10.6.3 defines auto-height as the distance from the content top
to the last in-flow child's margin-box bottom. Large negative margins can
make this negative, which has no geometric meaning. Clamp to 0 to match
browser behavior and fix Acid2 .empty div layout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 04:37:25 -05:00

22 lines
593 B
Plaintext

LayoutBox node=#2 tag=html box=block
content: (0, 0, 800, 16)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
LayoutBox node=#10 tag=body box=block
content: (8, 8, 784, 0)
padding: 0 0 0 0
border: 0 0 0 0
margin: 8 8 8 8
LayoutBox node=#12 tag=div box=block
content: (8, 8, 200, 0)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
LayoutBox node=#14 tag=div box=block
content: (8, 8, 200, 50)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 -100 0
inline_context: 0 lines, height=0, max_width=0