Expand description
BoxStyle: a Lip-Gloss-style box model (padding, border, margin).
Renders content into a standalone Grid, independent of any
Backend/Terminal.
BoxStyle does not word-wrap: it lays out already-broken lines (only
'\n' is treated specially).
For word-wrapping text to a width first, use Paragraph, then hand the
wrapped result to BoxStyle::render. Keeping wrapping and box-model
layout separate avoids tying every consumer of this module to Paragraph
or the egc feature.
Structsยง
- BoxStyle
- A box-model wrapper: content, padding, an optional single-line border,
and margin, rendered into a standalone
GridviaBoxStyle::render. - Boxed
- Pairs a
BoxStylewith the text it should render, so the pair can implementWidget(which has no room for a text parameter). Build one viaBoxStyle::text. - Sides
- CSS-style box-model sides: top/right/bottom/left, in terminal cells.