Hello !
I am a total newbie and trying to setup kirby with tailwind to play around an learn.
Though I am not able to get it running. I picked the plain version and followed the instructions on the kirby site.
Some basic default font styles from tailwind seem to be applied, but nothing I am adding to the default.php works.
I am getting a warning in the console. Not shure if this is hinting to the problem:
“warn - No utility classes were detected in your source files. If this is unexpected, double-check the content option in your Tailwind CSS configuration.”
How does your tailwind.config.js look like? You basically have to tell tailwind where to look for the classes you apply. Based on the kirby plainkit it could look omething like this.
I tried all the approaches and didn´t bring it to work yet.
I set up a test enviroment without kirby and there I managed to get tailwind to work.
Still clueless, why it won´t work in my kirby setup.
I am having a local setup with mamp as virtual server. Could this be a problem ?
Ok, that looks good to me. Then let’s remove the tailwind.config.js for the moment, as that is not necessarily needed, because package.json already points to the content to include
If I run the package.json with npx tailwindcss -i ./src/css/tailwind.css -o ./assets/css/styles.css --content './site/**/*.php' -w
It doesn´t build anything.
Though if i write the content path without the quotations, it works: npx tailwindcss -i ./src/css/tailwind.css -o ./assets/css/styles.css --content ./site/**/*.php -w
Any idea why this is a problem for me?
Thanks a lot for all the help and suggestion! Really happy it works
Excellent, I’m glad you got it working. I love Tailwind; it’s so easy to work with but clutters up the pages if you have a lot of classes, but I am ok with that over having to spend a lot more time writing CSS.