Part of #102 — wave 1.
Mini-spec
Goal: make grid actually produce columns. grid-template-columns is declared in CssStyle, is made mandatory by the validator, and is never passed to taffy — the only grid reference in taffy_bridge.rs is the Display::Grid mapping at line 33.
Invariants
- A
grid with three 1fr tracks renders three side-by-side cells, matching the flex-direction: row control.
flex layout behaviour is unchanged.
Out of scope: removing the validator's mandatory-tracks check (L4 owns validate_schema.rs); grid areas / named lines.
Acceptance
grid-template-columns, grid-template-rows, grid-column, grid-row, grid-auto-flow are translated into the corresponding taffy::Style fields.
- The three fixtures below each render three columns, not three stacked rows:
- tracks as strings
["1fr","1fr","1fr"]
- tracks as numbers
[1,1,1]
- with an explicit
display: "grid"
gap applies on both axes.
- A layout test asserts cell x-offsets differ (this is what the current code silently gets wrong).
Files: crates/rustmotion-core/src/css/taffy_bridge.rs, crates/rustmotion-core/src/css/style.rs
Note: crates/rustmotion-core/src/schema/style.rs is a different file owned by L4 — do not touch it.
Verify
rtk cargo test -p rustmotion-core
rtk cargo build --release
Part of #102 — wave 1.
Mini-spec
Goal: make
gridactually produce columns.grid-template-columnsis declared inCssStyle, is made mandatory by the validator, and is never passed to taffy — the onlygridreference intaffy_bridge.rsis theDisplay::Gridmapping at line 33.Invariants
gridwith three1frtracks renders three side-by-side cells, matching theflex-direction: rowcontrol.flexlayout behaviour is unchanged.Out of scope: removing the validator's mandatory-tracks check (L4 owns
validate_schema.rs); grid areas / named lines.Acceptance
grid-template-columns,grid-template-rows,grid-column,grid-row,grid-auto-floware translated into the correspondingtaffy::Stylefields.["1fr","1fr","1fr"][1,1,1]display: "grid"gapapplies on both axes.Files:
crates/rustmotion-core/src/css/taffy_bridge.rs,crates/rustmotion-core/src/css/style.rsNote:
crates/rustmotion-core/src/schema/style.rsis a different file owned by L4 — do not touch it.Verify