pub enum SpacingValue {
Zero,
Px,
Fractional(f32),
Integer(u32),
Auto,
Full,
Screen,
Min,
Max,
Fit,
}
Expand description
Spacing utility values for padding and margin
§Examples
use tailwind_rs_core::utilities::spacing::{SpacingValue, PaddingUtilities};
use tailwind_rs_core::classes::ClassBuilder;
let classes = ClassBuilder::new()
.padding(SpacingValue::Integer(4))
.padding_x(SpacingValue::Integer(6))
.build();
Variants§
Zero
Zero spacing (0)
Px
1px spacing
Fractional(f32)
Fractional spacing (0.5, 1.5, 2.5, 3.5)
Integer(u32)
Integer spacing (1, 2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 24, 32, 40, 48, 56, 64, 72, 80, 96)
Auto
Auto spacing
Full
Full spacing (100%)
Screen
Screen spacing (100vh)
Min
Min content spacing
Max
Max content spacing
Fit
Fit content spacing
Implementations§
Source§impl SpacingValue
impl SpacingValue
Sourcepub fn to_css_value(&self) -> String
pub fn to_css_value(&self) -> String
Convert to CSS value
Sourcepub fn to_class_name(&self) -> String
pub fn to_class_name(&self) -> String
Convert to class name
Sourcepub fn all_values() -> Vec<SpacingValue>
pub fn all_values() -> Vec<SpacingValue>
Get all valid spacing values
Trait Implementations§
Source§impl Clone for SpacingValue
impl Clone for SpacingValue
Source§fn clone(&self) -> SpacingValue
fn clone(&self) -> SpacingValue
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 SpacingValue
impl Debug for SpacingValue
Source§impl<'de> Deserialize<'de> for SpacingValue
impl<'de> Deserialize<'de> for SpacingValue
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
Source§impl Display for SpacingValue
impl Display for SpacingValue
Source§impl Hash for SpacingValue
impl Hash for SpacingValue
Source§impl PartialEq for SpacingValue
impl PartialEq for SpacingValue
Source§impl Serialize for SpacingValue
impl Serialize for SpacingValue
impl Copy for SpacingValue
impl Eq for SpacingValue
impl StructuralPartialEq for SpacingValue
Auto Trait Implementations§
impl Freeze for SpacingValue
impl RefUnwindSafe for SpacingValue
impl Send for SpacingValue
impl Sync for SpacingValue
impl Unpin for SpacingValue
impl UnwindSafe for SpacingValue
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.