Why are the tailwind classes not doing anything in the component?
So I have this navbar component where everything works correctly. Just for context:
You can see im using another component here called OpenGameButton, where none of the classes seem to be working for some reason i can't figure out. Here is just the return code of OpenGameButton because the rest is just the onclick handler:
None of the colors are working but the weirdest thing is that the p-2 class is actually working, but if i change it to anything else like p-3 or whatever it removes the padding completely. I dont know what to do or where to look. Its so over guys.
4 Replies
It's because you're likely using p-2 somewhere else in the project where tailwind looks at that code. I'm guessing for some reason your component is being excluded from tailwind, hence why changing it to p-3 or any other classes is not working. What does your tailwind config look like?
And what does your folder structure look like?
now i see it
i think.
should i add like a line with
forgot to mention that the OpenGameButton is the openGame.tsx in utils
Yes it's fixed 🤡 ðŸ˜
Ty for bringing the light. Its my first time with tailwind and its been pure chaos. But somehow everything ends up working out
Apologize for the delay in response but glad you figured it out! Tailwind really is great once it's all setup 😂