pub struct Style {Show 38 fields
pub font_family: Option<String>,
pub font_size: Option<CssValue>,
pub font_weight: Option<FontWeight>,
pub font_style: Option<String>,
pub line_height: Option<CssValue>,
pub letter_spacing: Option<CssValue>,
pub text_align: Option<TextAlign>,
pub text_decoration: Option<String>,
pub text_transform: Option<String>,
pub color: Option<Color>,
pub margin_top: Option<CssValue>,
pub margin_right: Option<CssValue>,
pub margin_bottom: Option<CssValue>,
pub margin_left: Option<CssValue>,
pub padding_top: Option<CssValue>,
pub padding_right: Option<CssValue>,
pub padding_bottom: Option<CssValue>,
pub padding_left: Option<CssValue>,
pub border_width: Option<CssValue>,
pub border_style: Option<String>,
pub border_color: Option<Color>,
pub background_color: Option<Color>,
pub width: Option<CssValue>,
pub height: Option<CssValue>,
pub max_width: Option<CssValue>,
pub max_height: Option<CssValue>,
pub page_break_before: Option<String>,
pub page_break_after: Option<String>,
pub extends: Option<String>,
pub writing_mode: Option<WritingMode>,
pub z_index: Option<i32>,
pub background_image: Option<String>,
pub background_size: Option<String>,
pub background_position: Option<String>,
pub background_repeat: Option<String>,
pub opacity: Option<f32>,
pub border_radius: Option<CssValue>,
pub box_shadow: Option<String>,
}Expand description
CSS-like style properties.
Fields§
§font_family: Option<String>Font family stack.
font_size: Option<CssValue>Font size with units.
font_weight: Option<FontWeight>Font weight (100-900 or keyword).
font_style: Option<String>Font style (normal, italic).
line_height: Option<CssValue>Line height (unitless ratio or with units).
letter_spacing: Option<CssValue>Letter spacing.
text_align: Option<TextAlign>Text alignment.
text_decoration: Option<String>Text decoration.
text_transform: Option<String>Text transform.
color: Option<Color>Text color.
margin_top: Option<CssValue>Top margin.
margin_right: Option<CssValue>Right margin.
margin_bottom: Option<CssValue>Bottom margin.
margin_left: Option<CssValue>Left margin.
padding_top: Option<CssValue>Top padding.
padding_right: Option<CssValue>Right padding.
padding_bottom: Option<CssValue>Bottom padding.
padding_left: Option<CssValue>Left padding.
border_width: Option<CssValue>Border width.
border_style: Option<String>Border style.
border_color: Option<Color>Border color.
background_color: Option<Color>Background color.
width: Option<CssValue>Width.
height: Option<CssValue>Height.
max_width: Option<CssValue>Maximum width.
max_height: Option<CssValue>Maximum height.
page_break_before: Option<String>Page break before.
page_break_after: Option<String>Page break after.
extends: Option<String>Style to inherit from.
writing_mode: Option<WritingMode>Writing mode for text direction.
z_index: Option<i32>Z-index for stacking order.
background_image: Option<String>Background image URL.
background_size: Option<String>Background size.
background_position: Option<String>Background position.
background_repeat: Option<String>Background repeat.
opacity: Option<f32>Element opacity (0.0 to 1.0).
border_radius: Option<CssValue>Border radius.
box_shadow: Option<String>Box shadow.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Style
impl<'de> Deserialize<'de> for Style
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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