๐ Hello, community!
Iโm facing an issue #โโhelp with Tailwind CSS in my project and could really use some help. ๐
๐ The Problem
Some Tailwind classes like my-5 (vertical margins) and ml-5 (left margin) are not working as expected. However, classes like mb-5 (bottom margin) seem to work fine. ๐ค
๐ ๏ธ Configuration Files
`
Vite
`
`
๐ Additional Details
โข Iโm using darkMode: 'class', and I can confirm that Tailwind is loading correctly because other classes work.
โข Iโve cleared my browser cache and recompiled assets using npm run dev, but the issue persists.
โ Any ideas what could be wrong?
Any advice or suggestions would be greatly appreciated. Thank you in advance! ๐ก
5 Replies
this is because classes like
my-5
are used by fialment and are already precompiled. Afaik you need a custom theme, and you need to put the directory of your resource (view) files in the content array
If you are 100% sure you are doing everything right, try and change the style from the web (devtools), and see if you can create changes that way. Sometimes, classes are overwritten by other classes and it might seem that they are not compiled, but in fact they are just not shown
Another way is to open the network tab and check the theme.css file by doing ctrl+f and your class nameHi Matthew,
I just wanted to thank you so much for your help on Discord. When I checked the webtool, I realized that the class mt-5 doesnโt exist, but mb-5 does. Iโm still not sure why this happens, but the good news is that I found out that mt-4 works, and thatโs enough for me to continue with the project!
Thanks again for your support, and I hope you have a great day!
Thank you very much, I will check it out now.
OMG it's working
i love you (L),
You made me very happy
happy to help :)