Raxol.UI.Layout.MinContent (Raxol v2.6.1)

View Source

Min-content inline (width) measurement: the smallest width an element can occupy without losing content (longest unbreakable text segment, declared width for fixed boxes, aggregates for containers).

FlexItem resolution adopts this as the automatic minimum size (min-width: auto) on the inline axis — a divider's min-content is 1 cell (not its full width) so it can't rob fixed-width siblings during shrink. Widths via Raxol.UI.TextMeasure (CJK double-width); unknown element types measure 0.

Summary

Functions

Longest unbreakable segment of a text, by display width; break opportunities mirror TextLayout (spaces, after hyphens, between CJK ideographs).

Min-content width of an element, in cells.

Functions

longest_segment(text)

Longest unbreakable segment of a text, by display width; break opportunities mirror TextLayout (spaces, after hyphens, between CJK ideographs).

width(element)

Min-content width of an element, in cells.