Skip to content

Commit

Permalink
feat: add blur plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
arlyon committed Aug 20, 2022
1 parent dc64ba1 commit d840025
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/config.rs
Expand Up @@ -59,6 +59,8 @@ pub struct TailwindTheme<'a> {
#[serde(borrow, alias = "letterSpacing")]
pub letter_spacing: HashMap<&'a str, &'a str>,
#[serde(borrow)]
pub blur: HashMap<&'a str, &'a str>,
#[serde(borrow)]
pub invert: HashMap<&'a str, &'a str>,
#[serde(borrow)]
pub opacity: HashMap<&'a str, &'a str>,
Expand Down
1 change: 1 addition & 0 deletions src/parse/literal.rs
Expand Up @@ -50,6 +50,7 @@ pub fn parse_literal<'a>(theme: &TailwindTheme, s: &'a str) -> Result<ObjectLit,
"tracking" => Required(plugin::tracking),
"invert" => Optional(plugin::invert),
"opacity" => Required(plugin::opacity),
"blur" => Optional(plugin::blur),
"sr" => Required(plugin::sr),
"bg" => Required(plugin::bg),
"h" => Required(plugin::h),
Expand Down
1 change: 1 addition & 0 deletions src/plugin.rs
Expand Up @@ -48,6 +48,7 @@ lookup_plugin_opt!(transition, transition_property, "transitionProperty");
lookup_plugin!(delay, transition_delay, "transitionDelay");
lookup_plugin_opt!(duration, transition_duration, "transitionDuration");
lookup_plugin_opt!(ease, transition_timing_function, "transitionTimingFunction");
lookup_plugin_opt!(blur, blur, "filter", |s| format!("blur({})", s));
lookup_plugin_opt!(invert, invert, "filter", |s| format!("invert({})", s));
lookup_plugin!(basis, flex_basis, "flexBasis");
lookup_plugin_opt!(grow, flex_grow, "flexGrow");
Expand Down

0 comments on commit d840025

Please sign in to comment.