Skip to main content

TcssValue

Enum TcssValue 

Source
pub enum TcssValue {
Show 20 variants Dimension(TcssDimension), Color(TcssColor), Border(BorderStyle), BorderWithColor(BorderStyle, TcssColor), Display(TcssDisplay), TextAlign(TextAlign), Overflow(Overflow), Visibility(Visibility), Float(f32), String(String), Bool(bool), DockEdge(DockEdge), LayoutDirection(LayoutDirection), Sides(Sides<f32>), Dimensions(Vec<TcssDimension>), BorderWithVariable(BorderStyle, String), Variable(String), Hatch(HatchStyle), Keyline(TcssColor), KeylineVariable(String),
}
Expand description

A parsed CSS property value before or after theme variable resolution.

Variants§

§

Dimension(TcssDimension)

A sizing dimension (length, percent, fraction, or auto).

§

Color(TcssColor)

A resolved RGB/RGBA color.

§

Border(BorderStyle)

A border style without an explicit color.

§

BorderWithColor(BorderStyle, TcssColor)

Border style + color shorthand (e.g. “border: solid #4a4a5a”)

§

Display(TcssDisplay)

A display mode value.

§

TextAlign(TextAlign)

A text alignment value.

§

Overflow(Overflow)

An overflow behavior value.

§

Visibility(Visibility)

A visibility value.

§

Float(f32)

A bare floating-point number (opacity, flex-grow, padding cell count).

§

String(String)

A quoted string value.

§

Bool(bool)

A boolean flag value.

§

DockEdge(DockEdge)

A dock-edge placement value.

§

LayoutDirection(LayoutDirection)

A layout direction value.

§

Sides(Sides<f32>)

Shorthand with all 4 sides (padding/margin with 2+ values)

§

Dimensions(Vec<TcssDimension>)

List of dimensions (grid-template-columns/rows)

§

BorderWithVariable(BorderStyle, String)

Border style + unresolved theme variable (e.g. “border: tall $primary”). Resolved to BorderWithColor during cascade via Theme::resolve().

§

Variable(String)

Unresolved theme variable reference (e.g., “primary”, “accent-darken-1”). Stored during parsing, resolved to Color during cascade via Theme::resolve().

§

Hatch(HatchStyle)

Hatch pattern fill (e.g., “hatch: cross”)

§

Keyline(TcssColor)

Keyline separator color between grid children (e.g., “keyline: $primary”)

§

KeylineVariable(String)

Keyline with unresolved theme variable

Trait Implementations§

Source§

impl Clone for TcssValue

Source§

fn clone(&self) -> TcssValue

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TcssValue

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for TcssValue

Source§

fn eq(&self, other: &TcssValue) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for TcssValue

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> StorageAccess<T> for T

Source§

fn as_borrowed(&self) -> &T

Borrows the value.
Source§

fn into_taken(self) -> T

Takes the value.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.