pub struct Style {Show 71 fields
pub background_color: Color,
pub background_image: Option<GradientStack>,
pub border_bottom_color: Color,
pub border_bottom_left_radius: Length,
pub border_bottom_right_radius: Length,
pub border_bottom_width: Length,
pub border_left_color: Color,
pub border_left_width: Length,
pub border_right_color: Color,
pub border_right_width: Length,
pub border_top_color: Color,
pub border_top_left_radius: Length,
pub border_top_right_radius: Length,
pub border_top_width: Length,
pub bottom: Unit,
pub box_shadow: Option<Arc<[BoxShadow]>>,
pub child_between: Unit,
pub child_bottom: Unit,
pub child_left: Unit,
pub child_right: Unit,
pub child_top: Unit,
pub color: Color,
pub display: Option<Direction>,
pub flex_basis: Length,
pub font_family: Option<Arc<str>>,
pub font_size: f32,
pub font_style: FontStyle,
pub font_weight: f32,
pub font_width: f32,
pub height: Unit,
pub left: Unit,
pub letter_spacing: Option<Unit>,
pub line_height: Unit,
pub max_bottom: Option<Length>,
pub max_child_between: Option<Length>,
pub max_child_bottom: Option<Length>,
pub max_child_left: Option<Length>,
pub max_child_right: Option<Length>,
pub max_child_top: Option<Length>,
pub max_height: Option<Length>,
pub max_left: Option<Length>,
pub max_right: Option<Length>,
pub max_top: Option<Length>,
pub max_width: Option<Length>,
pub min_bottom: Option<Length>,
pub min_child_between: Option<Length>,
pub min_child_bottom: Option<Length>,
pub min_child_left: Option<Length>,
pub min_child_right: Option<Length>,
pub min_child_top: Option<Length>,
pub min_height: Option<Length>,
pub min_left: Option<Length>,
pub min_right: Option<Length>,
pub min_top: Option<Length>,
pub min_width: Option<Length>,
pub opacity: f32,
pub outline_color: Color,
pub outline_offset: Length,
pub outline_width: Length,
pub position: Position,
pub right: Unit,
pub selection_background: Color,
pub selection_color: Option<Color>,
pub text_align: TextAlign,
pub text_shadow: Option<Arc<[TextShadow]>>,
pub top: Unit,
pub transform: Affine,
pub visibility: bool,
pub width: Unit,
pub word_spacing: Option<Unit>,
pub z_index: i32,
}Expand description
Computed style properties of a Node.
The Ui::on_style callback gives an application the opportunity to modify a node’s style after CSS rules have been applied and before rendering.
Fields§
§background_color: Color§background_image: Option<GradientStack>§border_bottom_color: Color§border_bottom_left_radius: Length§border_bottom_right_radius: Length§border_bottom_width: Length§border_left_color: Color§border_left_width: Length§border_right_color: Color§border_right_width: Length§border_top_color: Color§border_top_left_radius: Length§border_top_right_radius: Length§border_top_width: Length§bottom: Unit§box_shadow: Option<Arc<[BoxShadow]>>§child_between: Unit§child_bottom: Unit§child_left: Unit§child_right: Unit§child_top: Unit§color: Color§display: Option<Direction>§flex_basis: Length§font_family: Option<Arc<str>>§font_size: f32§font_style: FontStyle§font_weight: f32§font_width: f32§height: Unit§left: Unit§letter_spacing: Option<Unit>§line_height: Unit§max_bottom: Option<Length>§max_child_between: Option<Length>§max_child_bottom: Option<Length>§max_child_left: Option<Length>§max_child_right: Option<Length>§max_child_top: Option<Length>§max_height: Option<Length>§max_left: Option<Length>§max_right: Option<Length>§max_top: Option<Length>§max_width: Option<Length>§min_bottom: Option<Length>§min_child_between: Option<Length>§min_child_bottom: Option<Length>§min_child_left: Option<Length>§min_child_right: Option<Length>§min_child_top: Option<Length>§min_height: Option<Length>§min_left: Option<Length>§min_right: Option<Length>§min_top: Option<Length>§min_width: Option<Length>§opacity: f32§outline_color: Color§outline_offset: Length§outline_width: Length§position: Position§right: Unit§selection_background: Color§selection_color: Option<Color>If selection_color is None, selected text will not have a different color.
text_align: TextAlign§text_shadow: Option<Arc<[TextShadow]>>§top: Unit§transform: Affine§visibility: bool§width: Unit§word_spacing: Option<Unit>§z_index: i32Implementations§
Source§impl Style
impl Style
pub fn get_font_layout_style(&self) -> FontLayoutStyle
Trait Implementations§
impl StructuralPartialEq for Style
Auto Trait Implementations§
impl Freeze for Style
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnsafeUnpin for Style
impl UnwindSafe for Style
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more