Files
rust_browser/tests/goldens/expected/150-flex-nav-in-grid.dl.txt
Zachary D. Rowitsch 20e241bd03
All checks were successful
ci / fast (linux) (push) Successful in 6m52s
Implement margin collapsing through empty elements (CSS 2.1 §8.3.1)
Self-collapsing elements (zero height, no padding/border, no BFC, no line
boxes) now have their top and bottom margins collapse together, and child
margins propagate through parents with auto height and no bottom
padding/border. This replaces the pairwise collapse_margins() function
with a MarginSet accumulator that tracks max positive and min negative
margins separately, correctly resolving chains of 4+ margins.

Key changes:
- Add is_self_collapsing() post-layout predicate and gather_all_margins()
- Add gather_margin_bottom() for bottom margin propagation with a guard
  against propagation when max-height constrains the parent
- Replace prev_margin_bottom with MarginSet-based pending_margins in the
  sibling layout loop
- Handle clearance + self-collapsing interaction correctly

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 01:04:53 -05:00

10 lines
695 B
Plaintext

DisplayList items=8
Text rect=(10, 34.64, 57.538914, 32) text="Page" color=#000000 font_size=32 font_weight=700
Text rect=(73.647575, 34.64, 51.806168, 32) text="Title" color=#000000 font_size=32 font_weight=700
Text rect=(10, 92.880005, 33.421436, 16) text="Home" color=#0000ee font_size=16
SolidRect rect=(10, 107.72372, 33.421436, 1.1428572) color=#0000ee
Text rect=(53.421436, 92.880005, 33.339207, 16) text="About" color=#0000ee font_size=16
SolidRect rect=(53.421436, 107.72372, 33.339207, 1.1428572) color=#0000ee
Text rect=(96.76064, 92.880005, 42.5022, 16) text="Contact" color=#0000ee font_size=16
SolidRect rect=(96.76064, 107.72372, 42.5022, 1.1428572) color=#0000ee