pub enum CssDependencyChainStep {
Percent {
source_node: NodeId,
factor: f32,
},
Em {
source_node: NodeId,
factor: f32,
},
Rem {
factor: f32,
},
Absolute {
pixels: f32,
},
}Expand description
Represents a single step in a CSS property dependency chain. Example: “10% of node 5” or “1.2em of node 3”
Variants§
Percent
Value depends on a percentage of another node’s resolved value e.g., font-size: 150% means 1.5 * parent’s font-size
Em
Value depends on an em multiple of another node’s font-size e.g., padding: 2em means 2.0 * current element’s font-size
Rem
Value depends on a rem multiple of root node’s font-size e.g., margin: 1.5rem means 1.5 * root font-size
Absolute
Absolute value (px, pt, etc.) - no further dependencies
Trait Implementations§
Source§impl Clone for CssDependencyChainStep
impl Clone for CssDependencyChainStep
Source§fn clone(&self) -> CssDependencyChainStep
fn clone(&self) -> CssDependencyChainStep
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 CssDependencyChainStep
impl Debug for CssDependencyChainStep
Source§impl PartialEq for CssDependencyChainStep
impl PartialEq for CssDependencyChainStep
impl StructuralPartialEq for CssDependencyChainStep
Auto Trait Implementations§
impl Freeze for CssDependencyChainStep
impl RefUnwindSafe for CssDependencyChainStep
impl Send for CssDependencyChainStep
impl Sync for CssDependencyChainStep
impl Unpin for CssDependencyChainStep
impl UnwindSafe for CssDependencyChainStep
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 more