pub struct Visual {Show 41 fields
pub background_color: Option<String>,
pub background_gradient: Option<Gradient>,
pub color: Option<String>,
pub border_width: Option<f32>,
pub border_widths: Option<[f32; 4]>,
pub border_color: Option<String>,
pub border_style: Option<String>,
pub border_radius: Option<f32>,
pub corner_radii: Option<[f32; 4]>,
pub opacity: Option<f32>,
pub box_shadow: Option<Vec<ShadowLayer>>,
pub font_size: Option<f32>,
pub font_weight: Option<u16>,
pub line_height: Option<f32>,
pub font_family: Option<String>,
pub text_align: Option<String>,
pub letter_spacing: Option<f32>,
pub text_decoration: Option<String>,
pub text_transform: Option<String>,
pub font_style: Option<String>,
pub padding_horizontal: Option<f32>,
pub padding_vertical: Option<f32>,
pub padding: Option<[f32; 4]>,
pub gap: Option<f32>,
pub native: bool,
pub overflow_hidden: bool,
pub overflow_scroll: bool,
pub overflow_x: Option<String>,
pub overflow_y: Option<String>,
pub transform: Option<Vec<TransformOp>>,
pub transition: Option<Transition>,
pub visibility_hidden: bool,
pub display_none: bool,
pub pointer_events_none: bool,
pub user_select: Option<String>,
pub cursor: Option<String>,
pub series_colors: Option<Vec<String>>,
pub direction: Option<String>,
pub backdrop_blur: Option<f32>,
pub animation: Option<VisualAnimation>,
pub sticky: bool,
}Expand description
Painted properties, RESOLVED (hex colours, px numbers, shadow layers, family names). Painters never read the theme; they paint this.
Fields§
§background_color: Option<String>§background_gradient: Option<Gradient>§color: Option<String>§border_width: Option<f32>The uniform border width (borderWidth); per-side widths are in
border_widths when any side differs.
border_widths: Option<[f32; 4]>[top, right, bottom, left] when a per-side width is set.
border_color: Option<String>§border_style: Option<String>solid | dashed | dotted (solid when unset).
border_radius: Option<f32>The uniform radius in px (a % resolves against the laid-out box).
corner_radii: Option<[f32; 4]>[topLeft, topRight, bottomRight, bottomLeft] when a corner is set.
opacity: Option<f32>§box_shadow: Option<Vec<ShadowLayer>>§font_size: Option<f32>§font_weight: Option<u16>§line_height: Option<f32>§font_family: Option<String>§text_align: Option<String>PHYSICAL: left | right | center | justify (start/end resolved by
the surface direction).
letter_spacing: Option<f32>§text_decoration: Option<String>none | underline | line-through
text_transform: Option<String>none | uppercase | lowercase | capitalize
font_style: Option<String>normal | italic
padding_horizontal: Option<f32>The recipe’s padding on a MEASURED leaf (a Button’s label inset): the
painter draws it, the measurer includes it; taffy never sees it.
The averages of the two sides; padding has each side.
padding_vertical: Option<f32>§padding: Option<[f32; 4]>A leaf’s padding [top, right, bottom, left] (logical keys resolved).
gap: Option<f32>§native: boolnative: true on the part’s recipe: the painter may use the platform’s
own control (geometry still from the tokens).
overflow_scroll: bool§overflow_x: Option<String>Per axis: visible | hidden | clip | scroll | auto (overflow merged).
overflow_y: Option<String>§transform: Option<Vec<TransformOp>>Paint-only transform functions in source order.
transition: Option<Transition>visibility: hidden: the box stays, nothing paints, out of the a11y tree.
display_none: boolVAPP-126: display: none (a base style or a matching media block).
The node stays in the tree, laid out at zero size with its subtree;
a painter clips it, so a control inside draws nothing past the box.
pointer_events_none: boolpointerEvents: none: presses pass through.
user_select: Option<String>§cursor: Option<String>§series_colors: Option<Vec<String>>A Chart’s series (or slice) colours, resolved for the mode.
direction: Option<String>Round 2: a LEAF’s resolved direction (ltr | rtl): the bidi
paragraph direction its text is shaped with.
backdrop_blur: Option<f32>Round 2: backdropBlur in px ($blur.* resolved): blur what is
behind the box through its translucent background. No platform blur
= paint the background alone.
animation: Option<VisualAnimation>Round 2: the keyframe animation with its resolved timing; a painter
keeps the time the node entered the tree and paints
crate::animation::frame_with_timing.
sticky: boolRound 2: position: sticky (the pinned offsets are
LayoutOutput::sticky).