pub struct CssVariable {
pub name: String,
pub value: String,
pub uri: Url,
pub range: Range,
pub name_range: Option<Range>,
pub value_range: Option<Range>,
pub selector: String,
pub important: bool,
pub inline: bool,
pub source_position: usize,
}Expand description
Represents a CSS variable definition
Fields§
§name: StringVariable name (e.g., “–primary-color”)
value: StringVariable value (e.g., “#3b82f6”)
uri: UrlDocument URI where the variable is defined
range: RangeRange of the entire declaration (e.g., “–foo: red”)
name_range: Option<Range>Range of just the variable name (e.g., “–foo”)
value_range: Option<Range>Range of just the value part (e.g., “red”)
selector: StringCSS selector where this variable is defined (e.g., “:root”, “div”, “.class”)
important: boolWhether this definition uses !important
inline: boolWhether this definition is from an inline style attribute
source_position: usizeCharacter position in file (for source order in cascade)
Trait Implementations§
Source§impl Clone for CssVariable
impl Clone for CssVariable
Source§fn clone(&self) -> CssVariable
fn clone(&self) -> CssVariable
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 CssVariable
impl Debug for CssVariable
Source§impl<'de> Deserialize<'de> for CssVariable
impl<'de> Deserialize<'de> for CssVariable
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
Auto Trait Implementations§
impl Freeze for CssVariable
impl RefUnwindSafe for CssVariable
impl Send for CssVariable
impl Sync for CssVariable
impl Unpin for CssVariable
impl UnwindSafe for CssVariable
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