pub struct ComputedStyle {Show 17 fields
pub color: Rgba,
pub background_color: Option<Rgba>,
pub font_size: f32,
pub font_weight: FontWeight,
pub font_style: FontStyle,
pub font_family: Vec<String>,
pub text_align: TextAlign,
pub line_height: f32,
pub padding: Edges<f32>,
pub margin: Edges<f32>,
pub width: SizeValue,
pub height: SizeValue,
pub display: Display,
pub vertical_align: VerticalAlign,
pub border: Edges<BorderSpec>,
pub text_decoration: TextDecoration,
pub href: Option<String>,
}Expand description
The computed style of a DOM node, including all inherited styles.
Fields§
§color: RgbaThe computed color of the text.
background_color: Option<Rgba>The computed background color of the node.
font_size: f32The computed font size of the text.
font_weight: FontWeightThe computed font weight of the text.
font_style: FontStyleThe computed font style of the text.
font_family: Vec<String>The computed font family of the text.
text_align: TextAlignThe computed text alignment of the node.
line_height: f32The computed line height of the text.
padding: Edges<f32>The computed padding of the node.
margin: Edges<f32>The computed margin of the node.
width: SizeValueThe computed width of the node.
height: SizeValueThe computed height of the node.
display: DisplayThe computed display property of the node.
vertical_align: VerticalAlignThe computed vertical alignment of the node.
border: Edges<BorderSpec>The computed border of the node.
text_decoration: TextDecorationThe computed text decoration of the node.
href: Option<String>The computed href of the link, if the node is a link.
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 · 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§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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().