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
use super::*;
#[derive(Clone, Debug)]
pub struct TailwindBackgroundBlend {
wrapper: TailwindBlend,
}
impl Display for TailwindBackgroundBlend {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(f, "bg-blend-{}", self.wrapper.get_class())
}
}
impl TailwindInstance for TailwindBackgroundBlend {
fn attributes(&self, _: &TailwindBuilder) -> BTreeSet<CssAttribute> {
css_attributes! {
"background-blend-mode" => self.wrapper.get_properties()
}
}
}
impl TailwindBackgroundBlend {
pub fn parse(input: &[&str], arbitrary: &TailwindArbitrary) -> Result<Self> {
Ok(Self { wrapper: TailwindBlend::parse(input, arbitrary)? })
}
}