pub struct DarkModeVariant {
    pub class: String,
    pub is_hover: bool,
    pub is_focus: bool,
    pub is_active: bool,
    pub is_disabled: bool,
    pub is_checked: bool,
    pub is_group_hover: bool,
    pub is_group_focus: bool,
}Expand description
Represents a dark mode variant in Tailwind CSS
Fields§
§class: StringThe base class name (e.g., “bg-gray-800”, “text-white”)
is_hover: boolWhether this is a hover variant (dark:hover:bg-gray-700)
is_focus: boolWhether this is a focus variant (dark:focus:bg-gray-700)
is_active: boolWhether this is an active variant (dark:active:bg-gray-700)
is_disabled: boolWhether this is a disabled variant (dark:disabled:bg-gray-700)
is_checked: boolWhether this is a checked variant (dark:checked:bg-gray-700)
is_group_hover: boolWhether this is a group hover variant (dark:group-hover:bg-gray-700)
is_group_focus: boolWhether this is a group focus variant (dark:group-focus:bg-gray-700)
Implementations§
Source§impl DarkModeVariant
 
impl DarkModeVariant
Sourcepub fn group_hover(class: impl Into<String>) -> Self
 
pub fn group_hover(class: impl Into<String>) -> Self
Create a dark mode group hover variant
Sourcepub fn group_focus(class: impl Into<String>) -> Self
 
pub fn group_focus(class: impl Into<String>) -> Self
Create a dark mode group focus variant
Sourcepub fn to_class_name(&self) -> String
 
pub fn to_class_name(&self) -> String
Convert to Tailwind CSS class name
Sourcepub fn validate(&self) -> Result<(), DarkModeVariantError>
 
pub fn validate(&self) -> Result<(), DarkModeVariantError>
Validate the dark mode variant
Trait Implementations§
Source§impl Clone for DarkModeVariant
 
impl Clone for DarkModeVariant
Source§fn clone(&self) -> DarkModeVariant
 
fn clone(&self) -> DarkModeVariant
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 DarkModeVariant
 
impl Debug for DarkModeVariant
Source§impl<'de> Deserialize<'de> for DarkModeVariant
 
impl<'de> Deserialize<'de> for DarkModeVariant
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 DarkModeVariant
 
impl Display for DarkModeVariant
Source§impl Hash for DarkModeVariant
 
impl Hash for DarkModeVariant
Source§impl PartialEq for DarkModeVariant
 
impl PartialEq for DarkModeVariant
Source§impl Serialize for DarkModeVariant
 
impl Serialize for DarkModeVariant
impl Eq for DarkModeVariant
impl StructuralPartialEq for DarkModeVariant
Auto Trait Implementations§
impl Freeze for DarkModeVariant
impl RefUnwindSafe for DarkModeVariant
impl Send for DarkModeVariant
impl Sync for DarkModeVariant
impl Unpin for DarkModeVariant
impl UnwindSafe for DarkModeVariant
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.