cssbox-core — A standalone CSS layout engine.
This crate implements CSS layout algorithms: block, inline, float, positioning, flexbox, grid, and table. It takes a tree of styled nodes as input and produces computed positions and sizes as output.
Usage
use BoxTreeBuilder;
use ComputedStyle;
use Size;
use ;
let mut builder = new;
let root = builder.root;
// ... add children ...
let tree = builder.build;
let result = compute_layout;
let root_rect = result.bounding_rect;