Can't use @apply with utilities added by a plugin #1913
Unanswered
HapLifeMan
asked this question in
Help
Replies: 1 comment 3 replies
-
What does the definition of |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm using Tailwind for a while now and I'm starting using plugins.
I passed the last days searching on internet why I can't use @apply with a new utility added by a plugin, but I didn't find the solution. So I'm here hoping you can help me!
I'm using Nuxt with
@nuxtjs/tailwindcss
, and thetailwindcss-rtl
plugin, which adds some useful utilities likeme-{size}
,ms-{size}
to use paddings in RTL and LTR directions easily.Here's my CSS files:
Here's the error:
@apply cannot be used with .ms-2 because .ms-2 either cannot be found, or its actual definition includes a pseudo-selector like :hover, :active, etc. If you're sure that .ms-2 exists, make sure that any @import statements are being properly processed *before* Tailwind CSS sees your CSS, as @apply can only be used for classes in the same CSS tree.
Also, I would like to precise that I'm @Applying classes in some classes in
main.css
imported from components files.Thanks if you can provide any help 🙏🏻
Beta Was this translation helpful? Give feedback.
All reactions