Skip to content
Discussion options

You must be logged in to vote

Hey! See the docs, how this works is all explained there:

https://tailwindcss.com/docs/content-configuration#using-regular-expressions

Patterns can only match against base utility names like /bg-red-.+/, and won’t match if the pattern includes a variant modifier like /hover:bg-red-.+/.

If you want to force Tailwind to generate variants for any matched classes, include them using the variants option.

Here's a demo of it working with your code:

https://play.tailwindcss.com/jFCWmzSAXK?file=config

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by x-o1d
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #10240 on January 04, 2023 14:32.