pub struct LayoutStyle {
pub padding_top: i32,
pub padding_bottom: i32,
pub padding_left: i32,
pub padding_right: i32,
pub margin_top: i32,
pub margin_bottom: i32,
pub margin_left: i32,
pub margin_right: i32,
pub gap_row: i32,
pub gap_col: i32,
}Expand description
Fully resolved layout-related style properties (padding, margin, gap).
Produced by resolve_layout_style from the style cascade. The
run_layout pass reads this struct for each node before computing
geometry.
Mirrors the LPAR-08 TextStyle pattern:
a new resolved struct alongside StylePatch
additions; the frozen 5-field core::style::Style is not extended.
§Defaults
All fields resolve to 0 when no style entry provides a value (matching
LPAR-07 §7.4 reserved defaults for padding and margin).
Fields§
§padding_top: i32Padding on the top edge in pixels.
padding_bottom: i32Padding on the bottom edge in pixels.
padding_left: i32Padding on the left edge in pixels.
padding_right: i32Padding on the right edge in pixels.
margin_top: i32Margin on the top edge in pixels.
margin_bottom: i32Margin on the bottom edge in pixels.
margin_left: i32Margin on the left edge in pixels.
margin_right: i32Margin on the right edge in pixels.
gap_row: i32Row gap (spacing between rows / cross-axis tracks) in pixels.
gap_col: i32Column gap (spacing between columns / main-axis tracks) in pixels.
Trait Implementations§
Source§impl Clone for LayoutStyle
impl Clone for LayoutStyle
Source§fn clone(&self) -> LayoutStyle
fn clone(&self) -> LayoutStyle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more