You defined a layout in Rust and now you need the same arrangement in the browser. Translating row/column/grow/fixed into display: flex; flex-direction: row; flex-grow: 2; flex-basis: 0px by hand is error-prone and tedious.
panes-css transpiles panes layout trees into CSS flexbox and grid declarations. The browser becomes the solver — Taffy is not invoked.
Install
cargo add panes panes-css
Usage
use ;
let layout = layout! ?;
let css = emit;
Output:
}
}
}
Panels use [data-pane="kind"] selectors. Containers use [data-pane-node="N"]. The root uses [data-pane-root]. Dashboard layouts emit CSS Grid.
License
MIT or Apache 2.0, at your option. See LICENSE-MIT and LICENSE-APACHE.