Style properties for layout computation, mirroring the Flexbox subset used by ElixirOpentui (no CSS grid, no float).
Summary
Functions
Build a Style from keyword attrs, normalizing shorthand padding/margin.
Types
@type align_items() :: :flex_start | :flex_end | :center | :stretch
@type align_self() :: :auto | :flex_start | :flex_end | :center | :stretch
@type border_style() :: :single | :double | :rounded | :heavy
@type cursor_style() :: :block | :underline | :bar
@type dimension() :: non_neg_integer() | :auto | {:percent, float()}
@type flex_direction() :: :row | :column | :row_reverse | :column_reverse
@type flex_wrap() :: :no_wrap | :wrap | :wrap_reverse
@type justify_content() ::
:flex_start
| :flex_end
| :center
| :space_between
| :space_around
| :space_evenly
@type position_type() :: :relative | :absolute
@type t() :: %ElixirOpentui.Style{ align_items: align_items(), align_self: align_self(), bg: ElixirOpentui.Color.t() | nil, blink: boolean(), bold: boolean(), border: boolean(), border_style: border_style(), border_title: String.t() | nil, border_title_align: :left | :center | :right, bottom: non_neg_integer() | nil, cursor_color: ElixirOpentui.Color.t() | nil, cursor_style: cursor_style() | nil, dim: boolean(), fg: ElixirOpentui.Color.t() | nil, flex_basis: dimension(), flex_direction: flex_direction(), flex_grow: number(), flex_shrink: number(), flex_wrap: flex_wrap(), focus_bg: ElixirOpentui.Color.t() | nil, focus_border_color: ElixirOpentui.Color.t() | nil, focus_fg: ElixirOpentui.Color.t() | nil, gap: non_neg_integer(), height: dimension(), hidden: boolean(), inverse: boolean(), italic: boolean(), justify_content: justify_content(), left: non_neg_integer() | nil, margin: {non_neg_integer(), non_neg_integer(), non_neg_integer(), non_neg_integer()}, max_height: dimension(), max_width: dimension(), min_height: dimension(), min_width: dimension(), opacity: float(), overflow: :visible | :hidden, padding: {non_neg_integer(), non_neg_integer(), non_neg_integer(), non_neg_integer()}, position: position_type(), right: non_neg_integer() | nil, strikethrough: boolean(), top: non_neg_integer() | nil, underline: boolean(), width: dimension(), z_index: integer() }