diff --git a/tailwind/src/main.rs b/tailwind/src/main.rs index 3dfaead..0592397 100644 --- a/tailwind/src/main.rs +++ b/tailwind/src/main.rs @@ -32,6 +32,7 @@ bg-[--my-color] group-[:nth-of-type(3)_&]:block [&_p]:mt-4 + flex [@supports(display:grid)]:grid "# ); println!("TEXT - {}", test); diff --git a/tw-macro/src/lib.rs b/tw-macro/src/lib.rs index 2324750..2466e14 100644 --- a/tw-macro/src/lib.rs +++ b/tw-macro/src/lib.rs @@ -819,8 +819,15 @@ fn arbitrary_back_selector_modifier(input: &str) -> IResult<&str, ()> { Ok((input, ())) } +// [@supports(display:grid)]:grid +fn arbitrary_at_supports_rule_modifier(input: &str) -> IResult<&str, ()> { + let (input, _) = tag("[@supports(")(input)?; + let (input, _) = take_until(")")(input)?; + let (input, _) = tag(")]")(input)?; + Ok((input, ())) +} + // -// flex [@supports(display:grid)]:grid // [@media(any-hover:hover){&:hover}]:opacity-100 // group/edit invisible hover:bg-slate-200 group-hover/item:visible // hidden group-[.is-published]:block @@ -856,6 +863,7 @@ fn modifier(input: &str) -> IResult<&str, ()> { alt(( arbitrary_front_selector_modifier, arbitrary_back_selector_modifier, + arbitrary_at_supports_rule_modifier, predefined_modifier, ))(input) }