Commit 44ffad1
committed
feat(ie-layout): implement CSS flexbox layout #26
Flexbox layout engine (flex.rs):
- flex-direction: row, column, row-reverse, column-reverse
- flex-wrap: nowrap (default), wrap, wrap-reverse
- justify-content: flex-start, flex-end, center, space-between,
space-around, space-evenly
- align-items: flex-start, flex-end, center, stretch (default)
- Per-item align-self override
- flex-grow: distribute free space proportionally
- flex-shrink: shrink items when space is negative
- flex-basis: explicit base size before grow/shrink
- Flex line splitting for wrap mode
- Recursive child layout within flex items
- Content-based sizing fallback via text measurement
Integration:
- BoxType::Flex variant added
- display:flex routed to layout_flex in box generation
- Block layout dispatches Flex children to flex layout
6 new tests: equal grow, column direction, justify center,
align items center, space-between, wrap.
24 total ie-layout tests.1 parent a06656a commit 44ffad1
4 files changed
Lines changed: 631 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
211 | 221 | | |
212 | 222 | | |
213 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | | - | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | | - | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | | - | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
0 commit comments