Skip to content
● Critical PHP security fixes are out: update PHP on your Grav sites. What to do →

GRAV and TailwindCSS

first-time theme

Started by Jonathan Davis 4 years ago · 2 replies · 1214 views
4 years ago

I'm trying to sort out using tailwindcss and grav. I followed the docs on installing devtools, and created a new theme with them using the tailwind template type.

First thing I noticed was the base.deafult was including the wrong CSS file, trying to include a css/app' ~ extension ~ '.css' when package.json scripts were building site.css

Second thing I noticed is the tailwind.config.js that it produced is missing the content section that tells Tailwind what Tailwind class names you've used (It's using the older purge export?).

4 years ago

Hello @davis,

you get it working? You still need help?

4 years ago

After updating base.default and replacing app with site, and updating tailwind.config.js changing purge: [ ... ] to content: [ ... ] (and removing pretty much everything else in that file that overriding a lot of the tailwind base theme), it's working.

Are they pushing fixes for this in the next release?

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by FrViPofm, 1 month ago
4 554 4 weeks ago
Themes & Styling · by johan thomas, 5 years ago
1 870 1 month ago
Themes & Styling · by stuart young, 3 months ago
3 731 2 months ago
Themes & Styling · by Sebadamus, 3 months ago
5 751 3 months ago
Themes & Styling · by martynfoster735, 3 months ago
1 701 3 months ago