pub struct ComputedStyle {Show 146 fields
pub custom_properties: HashMap<String, String>,
pub registered_custom_properties: HashMap<String, PropertyRule>,
pub box_sizing: BoxSizing,
pub opacity: PercentageNumber,
pub animation_name: AnimationNames,
pub animation_duration: AnimationDurations,
pub animation_delay: AnimationDurations,
pub animation_timing_function: AnimationTimingFunctions,
pub animation_iteration_count: AnimationIterationCounts,
pub animation_direction: AnimationDirections,
pub animation_fill_mode: AnimationFillModes,
pub animation_play_state: AnimationPlayStates,
pub display: Display,
pub width: Length,
pub height: Length,
pub max_width: Length,
pub max_height: Length,
pub min_width: Length,
pub min_height: Length,
pub aspect_ratio: AspectRatio,
pub padding_top: LengthDefaultsToZero,
pub padding_right: LengthDefaultsToZero,
pub padding_bottom: LengthDefaultsToZero,
pub padding_left: LengthDefaultsToZero,
pub margin_top: LengthDefaultsToZero,
pub margin_right: LengthDefaultsToZero,
pub margin_bottom: LengthDefaultsToZero,
pub margin_left: LengthDefaultsToZero,
pub top: Length,
pub right: Length,
pub bottom: Length,
pub left: Length,
pub flex_direction: FlexDirection,
pub justify_self: AlignItems,
pub justify_content: JustifyContent,
pub align_content: JustifyContent,
pub justify_items: AlignItems,
pub align_items: AlignItems,
pub align_self: AlignItems,
pub flex_wrap: FlexWrap,
pub flex_basis: Option<Length>,
pub order: Order,
pub z_index: ZIndex,
pub position: Position,
pub rotate: Option<Angle>,
pub scale: SpacePair<PercentageNumber>,
pub translate: SpacePair<Length>,
pub transform: Option<Transforms>,
pub transform_origin: TransformOrigin,
pub mask_image: Option<BackgroundImages>,
pub mask_size: BackgroundSizes,
pub mask_position: BackgroundPositions,
pub mask_repeat: BackgroundRepeats,
pub column_gap: LengthDefaultsToZero,
pub row_gap: LengthDefaultsToZero,
pub flex_grow: Option<FlexGrow>,
pub flex_shrink: Option<FlexGrow>,
pub border_top_left_radius: SpacePair<LengthDefaultsToZero>,
pub border_top_right_radius: SpacePair<LengthDefaultsToZero>,
pub border_bottom_right_radius: SpacePair<LengthDefaultsToZero>,
pub border_bottom_left_radius: SpacePair<LengthDefaultsToZero>,
pub border_top_width: Length,
pub border_right_width: Length,
pub border_bottom_width: Length,
pub border_left_width: Length,
pub border_top_style: BorderStyle,
pub border_right_style: BorderStyle,
pub border_bottom_style: BorderStyle,
pub border_left_style: BorderStyle,
pub border_top_color: ColorInput,
pub border_right_color: ColorInput,
pub border_bottom_color: ColorInput,
pub border_left_color: ColorInput,
pub outline_width: Length,
pub outline_style: BorderStyle,
pub outline_color: ColorInput,
pub outline_offset: Length,
pub object_fit: ObjectFit,
pub overflow_x: Overflow,
pub overflow_y: Overflow,
pub object_position: ObjectPosition,
pub background_image: Option<BackgroundImages>,
pub background_position: BackgroundPositions,
pub background_size: BackgroundSizes,
pub background_repeat: BackgroundRepeats,
pub background_blend_mode: BlendModes,
pub background_color: ColorDefaultsToTransparent,
pub background_clip: BackgroundClip,
pub box_shadow: Option<BoxShadows>,
pub grid_auto_columns: Option<GridTrackSizes>,
pub grid_auto_rows: Option<GridTrackSizes>,
pub grid_auto_flow: GridAutoFlow,
pub grid_row_start: GridPlacement,
pub grid_row_end: GridPlacement,
pub grid_column_start: GridPlacement,
pub grid_column_end: GridPlacement,
pub grid_template_columns: Option<GridTemplateComponents>,
pub grid_template_rows: Option<GridTemplateComponents>,
pub grid_template_areas: Option<GridTemplateAreas>,
pub text_overflow: TextOverflow,
pub text_fit: TextFit,
pub text_transform: TextTransform,
pub font_style: FontStyle,
pub font_stretch: FontStretch,
pub color: ColorInput,
pub filter: Filters,
pub backdrop_filter: Filters,
pub font_size: FontSize,
pub font_family: FontFamily,
pub line_height: LineHeight,
pub font_weight: FontWeight,
pub font_variation_settings: FontVariationSettings,
pub font_feature_settings: FontFeatureSettings,
pub font_synthesis_weight: FontSynthesic,
pub font_synthesis_style: FontSynthesic,
pub line_clamp: Option<LineClamp>,
pub text_align: TextAlign,
pub webkit_text_stroke_width: Option<LengthDefaultsToZero>,
pub webkit_text_stroke_color: Option<ColorInput>,
pub webkit_text_fill_color: Option<ColorInput>,
pub stroke_linejoin: LineJoin,
pub text_shadow: Option<TextShadows>,
pub text_decoration_line: Option<TextDecorationLines>,
pub text_decoration_style: TextDecorationStyle,
pub text_decoration_color: ColorInput,
pub text_decoration_thickness: TextDecorationThickness,
pub text_decoration_skip_ink: TextDecorationSkipInk,
pub text_indent: TextIndent,
pub letter_spacing: Length,
pub word_spacing: Length,
pub image_rendering: ImageScalingAlgorithm,
pub overflow_wrap: OverflowWrap,
pub word_break: WordBreak,
pub clip_path: Option<BasicShape>,
pub clip_rule: FillRule,
pub white_space_collapse: WhiteSpaceCollapse,
pub text_wrap_mode: TextWrapMode,
pub text_wrap_style: TextWrapStyle,
pub direction: Direction,
pub float: Float,
pub clear: Clear,
pub isolation: Isolation,
pub mix_blend_mode: BlendMode,
pub visibility: Visibility,
pub vertical_align: VerticalAlign,
pub content: ContentValue,
}Expand description
The computed style snapshot used during layout and rendering.
Fields§
§custom_properties: HashMap<String, String>§registered_custom_properties: HashMap<String, PropertyRule>§box_sizing: BoxSizing§opacity: PercentageNumber§animation_name: AnimationNames§animation_duration: AnimationDurations§animation_delay: AnimationDurations§animation_timing_function: AnimationTimingFunctions§animation_iteration_count: AnimationIterationCounts§animation_direction: AnimationDirections§animation_fill_mode: AnimationFillModes§animation_play_state: AnimationPlayStates§display: Display§width: Length§height: Length§max_width: Length§max_height: Length§min_width: Length§min_height: Length§aspect_ratio: AspectRatio§padding_top: LengthDefaultsToZero§padding_right: LengthDefaultsToZero§padding_bottom: LengthDefaultsToZero§padding_left: LengthDefaultsToZero§margin_top: LengthDefaultsToZero§margin_right: LengthDefaultsToZero§margin_bottom: LengthDefaultsToZero§margin_left: LengthDefaultsToZero§top: Length§right: Length§bottom: Length§left: Length§flex_direction: FlexDirection§justify_self: AlignItems§justify_content: JustifyContent§align_content: JustifyContent§justify_items: AlignItems§align_items: AlignItems§align_self: AlignItems§flex_wrap: FlexWrap§flex_basis: Option<Length>§order: Order§z_index: ZIndex§position: Position§rotate: Option<Angle>§scale: SpacePair<PercentageNumber>§translate: SpacePair<Length>§transform: Option<Transforms>§transform_origin: TransformOrigin§mask_image: Option<BackgroundImages>§mask_size: BackgroundSizes§mask_position: BackgroundPositions§mask_repeat: BackgroundRepeats§column_gap: LengthDefaultsToZero§row_gap: LengthDefaultsToZero§flex_grow: Option<FlexGrow>§flex_shrink: Option<FlexGrow>§border_top_left_radius: SpacePair<LengthDefaultsToZero>§border_top_right_radius: SpacePair<LengthDefaultsToZero>§border_bottom_right_radius: SpacePair<LengthDefaultsToZero>§border_bottom_left_radius: SpacePair<LengthDefaultsToZero>§border_top_width: Length§border_right_width: Length§border_bottom_width: Length§border_left_width: Length§border_top_style: BorderStyle§border_right_style: BorderStyle§border_bottom_style: BorderStyle§border_left_style: BorderStyle§border_top_color: ColorInput§border_right_color: ColorInput§border_bottom_color: ColorInput§border_left_color: ColorInput§outline_width: Length§outline_style: BorderStyle§outline_color: ColorInput§outline_offset: Length§object_fit: ObjectFit§overflow_x: Overflow§overflow_y: Overflow§object_position: ObjectPosition§background_image: Option<BackgroundImages>§background_position: BackgroundPositions§background_size: BackgroundSizes§background_repeat: BackgroundRepeats§background_blend_mode: BlendModes§background_color: ColorDefaultsToTransparent§background_clip: BackgroundClip§box_shadow: Option<BoxShadows>§grid_auto_columns: Option<GridTrackSizes>§grid_auto_rows: Option<GridTrackSizes>§grid_auto_flow: GridAutoFlow§grid_row_start: GridPlacement§grid_row_end: GridPlacement§grid_column_start: GridPlacement§grid_column_end: GridPlacement§grid_template_columns: Option<GridTemplateComponents>§grid_template_rows: Option<GridTemplateComponents>§grid_template_areas: Option<GridTemplateAreas>§text_overflow: TextOverflow§text_fit: TextFit§text_transform: TextTransform§font_style: FontStyle§font_stretch: FontStretch§color: ColorInput§filter: Filters§backdrop_filter: Filters§font_size: FontSize§font_family: FontFamily§line_height: LineHeight§font_weight: FontWeight§font_variation_settings: FontVariationSettings§font_feature_settings: FontFeatureSettings§font_synthesis_weight: FontSynthesic§font_synthesis_style: FontSynthesic§line_clamp: Option<LineClamp>§text_align: TextAlign§webkit_text_stroke_width: Option<LengthDefaultsToZero>§webkit_text_stroke_color: Option<ColorInput>§webkit_text_fill_color: Option<ColorInput>§stroke_linejoin: LineJoin§text_shadow: Option<TextShadows>§text_decoration_line: Option<TextDecorationLines>§text_decoration_style: TextDecorationStyle§text_decoration_color: ColorInput§text_decoration_thickness: TextDecorationThickness§text_decoration_skip_ink: TextDecorationSkipInk§text_indent: TextIndent§letter_spacing: Length§word_spacing: Length§image_rendering: ImageScalingAlgorithm§overflow_wrap: OverflowWrap§word_break: WordBreak§clip_path: Option<BasicShape>§clip_rule: FillRule§white_space_collapse: WhiteSpaceCollapse§text_wrap_mode: TextWrapMode§text_wrap_style: TextWrapStyle§direction: Direction§float: Float§clear: Clear§isolation: Isolation§mix_blend_mode: BlendMode§visibility: Visibility§vertical_align: VerticalAlign§content: ContentValueImplementations§
Source§impl ComputedStyle
impl ComputedStyle
Sourcepub fn make_computed(&mut self, sizing: &SizingContext)
pub fn make_computed(&mut self, sizing: &SizingContext)
Normalize inheritable text-related values to computed values for this node.
pub fn is_invisible(&self) -> bool
pub fn is_z_index_applicable(&self, is_flex_or_grid_item: bool) -> bool
pub fn participates_in_positioned_paint_bucket( &self, is_flex_or_grid_item: bool, ) -> bool
pub fn creates_stacking_context( &self, border_box: Size<f32>, sizing: &SizingContext, is_flex_or_grid_item: bool, ) -> bool
pub fn needs_offscreen_compositing(&self) -> bool
pub fn has_non_identity_transform( &self, border_box: Size<f32>, sizing: &SizingContext, ) -> bool
pub fn resolve_overflows(&self) -> SpacePair<Overflow>
pub fn ellipsis_char(&self) -> &str
pub fn text_wrap_mode_and_line_clamp( &self, ) -> (TextWrapMode, Option<Cow<'_, LineClamp>>)
pub fn resolved_text_decoration_thickness( &self, sizing: &SizingContext, ) -> SizedTextDecorationThickness
pub fn to_taffy_style(&self, sizing: &SizingContext) -> Style
Source§impl ComputedStyle
impl ComputedStyle
pub fn from_parent(parent: &Self) -> Self
pub fn make_computed_values(&mut self, sizing: &SizingContext)
Trait Implementations§
Source§impl Clone for ComputedStyle
impl Clone for ComputedStyle
Source§fn clone(&self) -> ComputedStyle
fn clone(&self) -> ComputedStyle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ComputedStyle
impl Debug for ComputedStyle
Source§impl Default for ComputedStyle
impl Default for ComputedStyle
Source§fn default() -> ComputedStyle
fn default() -> ComputedStyle
Returns the “default value” for a type. Read more
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
Mutably borrows from an owned value. Read more