use std::{
cmp::Ordering,
fmt::{Debug, Display, Formatter},
hash::{Hash, Hasher},
};
use crate::{CssAttributes, 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) -> CssAttributes;
fn additional(&self, ctx: &TailwindBuilder) -> String {
String::new()
}
}