From b7e22ede709950d1b2c1cc4aced1c1e26b0f14b9 Mon Sep 17 00:00:00 2001 From: Alexander Lyon Date: Sun, 21 May 2023 09:19:40 +0100 Subject: [PATCH] feat: add caret plugin --- crates/tailwind-parse/src/eval/macros.rs | 1 + crates/tailwind-parse/src/eval/plugin.rs | 1 + crates/tailwind-parse/src/literal.rs | 1 + crates/tailwind-parse/src/plugin.rs | 1 + 4 files changed, 4 insertions(+) diff --git a/crates/tailwind-parse/src/eval/macros.rs b/crates/tailwind-parse/src/eval/macros.rs index 6cce441..c77951c 100644 --- a/crates/tailwind-parse/src/eval/macros.rs +++ b/crates/tailwind-parse/src/eval/macros.rs @@ -219,6 +219,7 @@ macro_rules! merge_plugins_arbitrary_opt { pub(crate) use array_map_plugin; pub(crate) use array_map_plugin_arbitrary; pub(crate) use array_plugin; +pub(crate) use lookup_color_plugin_arbitrary; pub(crate) use lookup_plugin; pub(crate) use lookup_plugin_arbitrary; pub(crate) use lookup_plugin_arbitrary_opt; diff --git a/crates/tailwind-parse/src/eval/plugin.rs b/crates/tailwind-parse/src/eval/plugin.rs index 8342af7..0c46fe5 100644 --- a/crates/tailwind-parse/src/eval/plugin.rs +++ b/crates/tailwind-parse/src/eval/plugin.rs @@ -128,6 +128,7 @@ lookup_plugin!(fill, colors, "fill"); lookup_plugin_arbitrary!(left, width, "left"); lookup_plugin_arbitrary!(right, width, "right"); lookup_plugin_arbitrary!(tracking, letter_spacing, "letterSpacing"); +lookup_color_plugin_arbitrary!(caret, colors, "caretColor"); lookup_plugin_arbitrary!(h, height, "height"); lookup_plugin!(ring_width, ring_width, "borderWidth"); lookup_plugin!(ring_color, colors, "--tw-ring-color"); diff --git a/crates/tailwind-parse/src/literal.rs b/crates/tailwind-parse/src/literal.rs index 9a33b46..4e95d4a 100644 --- a/crates/tailwind-parse/src/literal.rs +++ b/crates/tailwind-parse/src/literal.rs @@ -178,6 +178,7 @@ impl<'a> Literal<'a> { Left => RequiredArbitrary(plugin::left), Right => RequiredArbitrary(plugin::right), Tracking => RequiredArbitrary(plugin::tracking), + Caret => RequiredArbitraryTransparency(plugin::caret), Invert => Optional(plugin::invert), Float => Required(plugin::float), Space => Required(plugin::space), diff --git a/crates/tailwind-parse/src/plugin.rs b/crates/tailwind-parse/src/plugin.rs index cb29ef5..baa5aad 100644 --- a/crates/tailwind-parse/src/plugin.rs +++ b/crates/tailwind-parse/src/plugin.rs @@ -72,6 +72,7 @@ mod plugin { Mb, Z, Text, + Caret, Bg, Font, Fill,