Skip to content
Prev Previous commit
Next Next commit
Update packages/tailwindcss/src/variants.ts
Co-authored-by: Jordan Pittman <[email protected]>
  • Loading branch information
RobinMalfait and thecrypticace committed Nov 18, 2024
commit 4a391e34d3e670188c71f57b3fe65b7bf4e13d54
6 changes: 6 additions & 0 deletions packages/tailwindcss/src/variants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,12 @@ export function createVariants(theme: Theme): Variants {
if (!didApply) return null
})

variants.suggest('in', () => {
return Array.from(variants.keys()).filter((name) => {
return variants.compoundsWith('in', name)
})
})

variants.compound('has', Compounds.StyleRules, (ruleNode, variant) => {
if (variant.modifier) return null

Expand Down