-
Hello there! Tailwind 3.1 comes with arbitray variants and it's great, really, but documentation https://tailwindcss.com/docs/content-configuration#safelisting-classes still lacks many details about variants, about what and how we can whitelist them. For instance, if I want to preserve all classes ending with a color name, including their variants for some modifiers, I can set my
But this work only for a limited list of modifiers ( I'm guessing actually how to include all possible modifiers and also how to include arbitrary variants (I tried simply putting one there, but did not work). Any advice for me? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
No one? |
Beta Was this translation helpful? Give feedback.
-
See #7908 (comment)
|
Beta Was this translation helpful? Give feedback.
-
If you can set a {"--var-key" : arbistrary-value} on your element style you can read it in a tailwind-class: bg-[var(--var-key)] |
Beta Was this translation helpful? Give feedback.
See #7908 (comment)