pub struct Style {Show 43 fields
pub display: Display,
pub width: Option<Len>,
pub height: Option<Len>,
pub min_width: Option<Len>,
pub max_width: Option<Len>,
pub min_height: Option<Len>,
pub max_height: Option<Len>,
pub grid_columns: Vec<Track>,
pub grid_rows: Vec<Track>,
pub grid_column: (GridPlace, GridPlace),
pub grid_row: (GridPlace, GridPlace),
pub grid_auto_flow: GridFlow,
pub grid_auto_rows: Vec<Track>,
pub grid_auto_columns: Vec<Track>,
pub grow: f32,
pub shrink: f32,
pub basis: Option<Len>,
pub wrap: bool,
pub opacity: f32,
pub text_wrap: TextWrap,
pub padding: Sides,
pub margin: Sides,
pub border: Sides,
pub border_color: Option<Rgba>,
pub gap: f32,
pub row_gap: Option<f32>,
pub column_gap: Option<f32>,
pub axis: Axis,
pub justify: Option<Justify>,
pub align: Option<Align>,
pub align_self: Option<Align>,
pub justify_self: Option<Align>,
pub justify_items: Option<Align>,
pub align_content: Option<Justify>,
pub overflow: Overflow,
pub background: Option<Background>,
pub radius: Corners,
pub box_shadow: Option<BoxShadow>,
pub transform: Option<Transform>,
pub cursor: Cursor,
pub position: Position,
pub inset: [Option<Len>; 4],
pub aspect_ratio: Option<f32>,
}Expand description
The style subset M-series understands (a stand-in for the CSS ComputedStyle).
Fields§
§display: Display§width: Option<Len>§height: Option<Len>§min_width: Option<Len>§max_width: Option<Len>§min_height: Option<Len>§max_height: Option<Len>§grid_columns: Vec<Track>§grid_rows: Vec<Track>§grid_column: (GridPlace, GridPlace)grid-column / grid-row placement for a grid item: (start, end).
grid_row: (GridPlace, GridPlace)§grid_auto_flow: GridFlowgrid-auto-flow and the implicit-track sizes grid-auto-rows/-columns.
grid_auto_rows: Vec<Track>§grid_auto_columns: Vec<Track>§grow: f32§shrink: f32flex-shrink. CSS defaults to 1: a flex item gives up space to fit its
container. 0 keeps the item’s size and lets it overflow, which is the
author’s call, and what overflow: clip is for.
basis: Option<Len>flex-basis. None = auto (size from width/content).
wrap: boolflex-wrap: wrap: items that don’t fit start a new line.
opacity: f32opacity, 0.0–1.0. Applies to the whole subtree.
text_wrap: TextWrapoverflow-wrap / word-break, applied to a text node’s own content.
padding: Sides§margin: Sides§border: Sides§border_color: Option<Rgba>§gap: f32§row_gap: Option<f32>row-gap / column-gap overrides for the shorthand gap. None keeps
the shorthand (gap) value on that axis.
column_gap: Option<f32>§axis: Axis§justify: Option<Justify>§align: Option<Align>§align_self: Option<Align>align-self (flex/grid cross-axis) and justify-self (grid inline-axis)
for this item, overriding the parent’s align-items/justify-items.
justify_self: Option<Align>§justify_items: Option<Align>justify-items (grid) and align-content (multi-line flex / grid).
align_content: Option<Justify>§overflow: Overflow§background: Option<Background>§radius: Cornersborder-radius, per corner (top-left, top-right, bottom-right, bottom-left).
box_shadow: Option<BoxShadow>box-shadow (single, outer). Drawn behind the box’s own background.
transform: Option<Transform>transform: an affine applied to this box and its subtree at paint time.
Visual only: hit regions are not transformed.
cursor: Cursorcursor: the pointer shape over this box.
position: Positionposition and its inset (top, right, bottom, left). None per side =
auto. Only meaningful when position: absolute.
inset: [Option<Len>; 4]§aspect_ratio: Option<f32>aspect-ratio (width / height).