Tailwind 3 to 4 migration: unclear how to replicate @apply
functionality
#16349
-
In TW3, we used to be able to do this:
In TW4, this throws |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hey! Check this out: https://tailwindcss.com/docs/upgrade-guide#using-apply-with-vue-svelte-or-css-modules |
Beta Was this translation helpful? Give feedback.
-
@philipp-spiess thank you for the quick reply, I saw the
so I'm not using |
Beta Was this translation helpful? Give feedback.
Oh yeah sorry I was confused here!
@apply
slightly changed and you are not able to use it with non Tailwind utilities anymore. What you want to do in your case is to converted thetheme-mb
andtheme-mt
to utility functions instead: https://play.tailwindcss.com/9D3EZs6skd?file=css