outlay
Off-DOM CSS layout engine. Flexbox and CSS Grid solved as pure synchronous arithmetic — no DOM, no WASM, no native binaries — to feed real CSS layout to an SVG, canvas, PDF, or test-assertion pipeline. Matched to Chromium across the supported CSS subset at 0.5px tolerance, over 4,450 generated fixtures.
$npm install outlay
import { solveLayout } from "outlay"; const { boxes } = solveLayout({ id: "root", width: 400, height: 200, children: [{ id: "sidebar", width: 100 }, { id: "main", flexGrow: 1 }], }); boxes.get("main"); // { x: 100, y: 0, width: 300, height: 200, … }