pub struct Style {Show 63 fields
pub position: Option<Position>,
pub top: Option<Dim>,
pub right: Option<Dim>,
pub bottom: Option<Dim>,
pub left: Option<Dim>,
pub margin: Option<Lp>,
pub margin_x: Option<Lp>,
pub margin_y: Option<Lp>,
pub margin_top: Option<Lp>,
pub margin_right: Option<Lp>,
pub margin_bottom: Option<Lp>,
pub margin_left: Option<Lp>,
pub padding: Option<Lp>,
pub padding_x: Option<Lp>,
pub padding_y: Option<Lp>,
pub padding_top: Option<Lp>,
pub padding_right: Option<Lp>,
pub padding_bottom: Option<Lp>,
pub padding_left: Option<Lp>,
pub flex_direction: Option<FlexDir>,
pub flex_wrap: Option<FlexWrap>,
pub flex_grow: Option<f32>,
pub flex_shrink: Option<f32>,
pub flex_basis: Option<Dim>,
pub align_items: Option<Align>,
pub align_self: Option<Align>,
pub align_content: Option<ContentAlign>,
pub justify_content: Option<ContentAlign>,
pub width: Option<Dim>,
pub height: Option<Dim>,
pub min_width: Option<Dim>,
pub min_height: Option<Dim>,
pub max_width: Option<Dim>,
pub max_height: Option<Dim>,
pub aspect_ratio: Option<f32>,
pub display: Option<Display>,
pub border_style: Option<BorderStyle>,
pub border_top: Option<bool>,
pub border_right: Option<bool>,
pub border_bottom: Option<bool>,
pub border_left: Option<bool>,
pub gap: Option<f32>,
pub column_gap: Option<f32>,
pub row_gap: Option<f32>,
pub text_wrap: Option<TextWrap>,
pub overflow_x: Option<Overflow>,
pub overflow_y: Option<Overflow>,
pub background_color: Option<String>,
pub border_color: Option<String>,
pub border_top_color: Option<String>,
pub border_right_color: Option<String>,
pub border_bottom_color: Option<String>,
pub border_left_color: Option<String>,
pub border_background_color: Option<String>,
pub border_top_background_color: Option<String>,
pub border_right_background_color: Option<String>,
pub border_bottom_background_color: Option<String>,
pub border_left_background_color: Option<String>,
pub border_dim_color: Option<bool>,
pub border_top_dim_color: Option<bool>,
pub border_right_dim_color: Option<bool>,
pub border_bottom_dim_color: Option<bool>,
pub border_left_dim_color: Option<bool>,
}Expand description
The layout style for a DOM node.
Mirrors ink’s Styles type (styles.ts) with every prop that ink’s
apply* functions write to yoga (styles.ts:415–777). Layout-inert
props (text color, background, border colors) are carried as raw strings
for the renderer (M1-5) without influencing the taffy layout pass.
§Shorthand resolution
overflowshorthand: resolved JS-side in Box.tsx beforesetStyle— onlyoverflow_x/overflow_yper-axis values reach Rust.margin/marginX/marginY,padding/paddingX/paddingY,gapshorthands: NOT resolved JS-side (yoga handles viaEDGE_ALL/GUTTER_ALL). Rust carries these shorthands; the taffy mapping collapses them with anOption::orcascade.
Fields§
§position: Option<Position>§top: Option<Dim>§right: Option<Dim>§bottom: Option<Dim>§left: Option<Dim>§margin: Option<Lp>Shorthand — applies to all four edges (yoga EDGE_ALL).
margin_x: Option<Lp>Horizontal shorthand — left + right (yoga EDGE_HORIZONTAL).
margin_y: Option<Lp>Vertical shorthand — top + bottom (yoga EDGE_VERTICAL).
margin_top: Option<Lp>§margin_right: Option<Lp>§margin_bottom: Option<Lp>§margin_left: Option<Lp>§padding: Option<Lp>Shorthand — applies to all four edges.
padding_x: Option<Lp>Horizontal shorthand — left + right.
padding_y: Option<Lp>Vertical shorthand — top + bottom.
padding_top: Option<Lp>§padding_right: Option<Lp>§padding_bottom: Option<Lp>§padding_left: Option<Lp>§flex_direction: Option<FlexDir>§flex_wrap: Option<FlexWrap>§flex_grow: Option<f32>§flex_shrink: Option<f32>§flex_basis: Option<Dim>flexBasis — yoga accepts number (points), percent string, or auto.
align_items: Option<Align>§align_self: Option<Align>None encodes auto (taffy has no explicit AlignSelf::Auto variant).
align_content: Option<ContentAlign>§justify_content: Option<ContentAlign>§width: Option<Dim>§height: Option<Dim>§min_width: Option<Dim>§min_height: Option<Dim>§max_width: Option<Dim>§max_height: Option<Dim>§aspect_ratio: Option<f32>§display: Option<Display>§border_style: Option<BorderStyle>borderStyle value (styles.ts:255, 745). Some(_) → border active,
layout width = 1 per enabled edge. None → no border (width = 0).
Renderer uses the variant to select box-drawing characters (M1-5).
border_top: Option<bool>borderTop === false disables the top border edge (styles.ts:748-749).
border_right: Option<bool>§border_bottom: Option<bool>§border_left: Option<bool>§gap: Option<f32>All-axes shorthand (yoga GUTTER_ALL).
column_gap: Option<f32>§row_gap: Option<f32>§text_wrap: Option<TextWrap>textWrap mode for ink-text nodes. None → default Wrap
(matches ink’s ?? 'wrap' fallback at dom.ts:242).
overflow_x: Option<Overflow>§overflow_y: Option<Overflow>§background_color: Option<String>§border_color: Option<String>§border_top_color: Option<String>§border_right_color: Option<String>§border_bottom_color: Option<String>§border_left_color: Option<String>§border_background_color: Option<String>§border_top_background_color: Option<String>§border_right_background_color: Option<String>§border_bottom_background_color: Option<String>§border_left_background_color: Option<String>§border_dim_color: Option<bool>§border_top_dim_color: Option<bool>§border_right_dim_color: Option<bool>§border_bottom_dim_color: Option<bool>§border_left_dim_color: Option<bool>