Files
rust_browser/tests/goldens/expected/002-single-div.layout.txt
Zachary D. Rowitsch 6af273ba81
All checks were successful
ci / fast (linux) (push) Successful in 2m43s
Add CSS/HTML layout features: line-height, text-align, table attributes
Implement CSS properties:
- line-height: supports normal, unitless numbers, and length values
- text-align: left, right, center, justify (justify maps to left)
- border-spacing: gap between table cells
- vertical-align: top, middle, bottom for table cells

Implement HTML presentational attributes:
- cellspacing: maps to border-spacing CSS property
- cellpadding: applies padding to all descendant cells
- align: maps to text-align for table cells
- valign: maps to vertical-align for table cells

Key changes:
- Property-aware CSS parsing preserves unitless line-height as Number
- LineHeight enum with Normal/Number/Length variants for proper inheritance
- Line boxes use computed line-height (1.2x font-size for normal)
- Text alignment offsets fragment X positions after line building
- Border-spacing creates gaps between cells (not inside cells)
- Vertical-align offsets cell content within row height
- Golden tests now include UA stylesheet for accurate expectations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 02:02:42 -05:00

17 lines
437 B
Plaintext

LayoutBox node=#1 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=#2 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=#3 tag=div box=block
content: (8, 8, 784, 0)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
inline_context: 0 lines, height=0, max_width=0