pub struct ComputedStyle {Show 25 fields
pub display: TcssDisplay,
pub layout_direction: LayoutDirection,
pub width: TcssDimension,
pub height: TcssDimension,
pub min_width: TcssDimension,
pub min_height: TcssDimension,
pub max_width: TcssDimension,
pub max_height: TcssDimension,
pub padding: Sides<f32>,
pub margin: Sides<f32>,
pub border: BorderStyle,
pub border_title: Option<String>,
pub color: TcssColor,
pub background: TcssColor,
pub text_align: TextAlign,
pub overflow: Overflow,
pub scrollbar_gutter: bool,
pub visibility: Visibility,
pub opacity: f32,
pub dock: Option<DockEdge>,
pub flex_grow: f32,
pub grid_columns: Option<Vec<TcssDimension>>,
pub grid_rows: Option<Vec<TcssDimension>>,
pub hatch: Option<HatchStyle>,
pub keyline: Option<TcssColor>,
}Expand description
The resolved set of CSS properties for a widget after cascade application.
Fields§
§display: TcssDisplayLayout mode for this widget’s children.
layout_direction: LayoutDirectionFlow direction for flex layout children.
width: TcssDimensionExplicit width constraint.
height: TcssDimensionExplicit height constraint.
min_width: TcssDimensionMinimum width constraint.
min_height: TcssDimensionMinimum height constraint.
max_width: TcssDimensionMaximum width constraint.
max_height: TcssDimensionMaximum height constraint.
padding: Sides<f32>Inner spacing between border and content.
margin: Sides<f32>Outer spacing between this widget and siblings.
border: BorderStyleBorder drawing style.
border_title: Option<String>Optional title text shown in the border.
color: TcssColorForeground text color.
background: TcssColorBackground fill color.
text_align: TextAlignHorizontal text alignment.
overflow: OverflowContent overflow behavior.
scrollbar_gutter: boolWhether to reserve space for a scrollbar even when not scrolling.
visibility: VisibilityWhether the widget is rendered or hidden.
opacity: f32Transparency multiplier (0.0 = fully transparent, 1.0 = opaque).
dock: Option<DockEdge>Edge this widget is docked to, if any.
flex_grow: f32Flex grow factor for proportional size allocation.
grid_columns: Option<Vec<TcssDimension>>Grid column track definitions.
grid_rows: Option<Vec<TcssDimension>>Grid row track definitions.
hatch: Option<HatchStyle>Hatch pattern background fill.
keyline: Option<TcssColor>Keyline color for grid separators.
Implementations§
Source§impl ComputedStyle
impl ComputedStyle
Sourcepub fn apply_declarations(&mut self, decls: &[Declaration])
pub fn apply_declarations(&mut self, decls: &[Declaration])
Apply a list of CSS declarations to this style, overwriting any previously set properties.
Trait Implementations§
Source§impl Clone for ComputedStyle
impl Clone for ComputedStyle
Source§fn clone(&self) -> ComputedStyle
fn clone(&self) -> ComputedStyle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ComputedStyle
impl Debug for ComputedStyle
Source§impl Default for ComputedStyle
impl Default for ComputedStyle
Source§impl PartialEq for ComputedStyle
impl PartialEq for ComputedStyle
impl StructuralPartialEq for ComputedStyle
Auto Trait Implementations§
impl Freeze for ComputedStyle
impl RefUnwindSafe for ComputedStyle
impl Send for ComputedStyle
impl Sync for ComputedStyle
impl Unpin for ComputedStyle
impl UnsafeUnpin for ComputedStyle
impl UnwindSafe for ComputedStyle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more