Server-side size estimation — the substitute for client measurement.
The views accept CSS dimension strings ("3rem", "48px"); layout
decisions (how many text lines fit a block, whether a label fits a bar)
need those as numbers. Everything here is an ESTIMATE in rem against the
16px root default — good enough to pick a content tier, never used for
actual geometry (the browser still lays out from the real CSS values).
Summary
Functions
Estimated rendered width of a text label in rem at text-xs
(~0.45rem per grapheme + padding).
Parses a CSS dimension string to rem. "3rem" → 3.0, "48px" → 3.0.
Unparseable values (calc(...), percentages) fall back to default.
Functions
Estimated rendered width of a text label in rem at text-xs
(~0.45rem per grapheme + padding).
Parses a CSS dimension string to rem. "3rem" → 3.0, "48px" → 3.0.
Unparseable values (calc(...), percentages) fall back to default.