1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
use std::{
    cmp::Ordering,
    collections::BTreeSet,
    fmt::{Debug, Display, Formatter},
    hash::{Hash, Hasher},
};
use crate::{CssAttribute, TailwindBuilder};
pub mod instance;
#[allow(unused_variables)]
pub trait TailwindInstance: Display {
    
    #[inline]
    fn id(&self) -> String {
        self.to_string()
    }
    
    fn inlineable(&self) -> bool {
        true
    }
    
    fn boxed(self) -> Box<dyn TailwindInstance>
    where
        Self: Sized,
        Self: 'static,
    {
        Box::new(self)
    }
    
    fn selectors(&self, ctx: &TailwindBuilder) -> String {
        format!(".{}", self.id())
    }
    
    fn attributes(&self, ctx: &TailwindBuilder) -> BTreeSet<CssAttribute>;
    
    fn additional(&self, ctx: &TailwindBuilder) -> String {
        String::new()
    }
}