A positioned geometric box in the layout tree.
Summary
Functions
Computes border-box height (content height + padding + border).
Computes border-box width (content width + padding + border).
Computes total outer height including content height, padding, border, and margin.
Computes total outer width including content width, padding, border, and margin.
Types
@type box_type() ::
:block | :line | :text | :table | :table_row | :table_cell | :image
The structural category of a layout box.
@type t() :: %Press.Layout.Box{ background_color: term(), border_color: %{top: term(), right: term(), bottom: term(), left: term()}, border_style: %{top: term(), right: term(), bottom: term(), left: term()}, border_width: %{top: float(), right: float(), bottom: float(), left: float()}, children: [t()], color: term(), computed: map() | nil, font: atom() | nil, font_size: float() | nil, height: float() | nil, image: Press.Image.t() | nil, margin: %{top: float(), right: float(), bottom: float(), left: float()}, padding: %{top: float(), right: float(), bottom: float(), left: float()}, tag: String.t() | nil, text: String.t() | nil, type: box_type(), width: float() | nil, x: float() | nil, y: float() | nil }
A positioned geometric box struct.
Functions
Computes border-box height (content height + padding + border).
Computes border-box width (content width + padding + border).
Computes total outer height including content height, padding, border, and margin.
Computes total outer width including content width, padding, border, and margin.