I'm beginning to rebuild my personal website using Gatsby JS, and of course I want to use my favorite CSS framework, Tailwind CSS! I searched aroun...
For further actions, you may consider blocking this person and/or reporting abuse
Three Gatsby starters that use Tailwind:
Thanks so much for sharing these!
For anyone who comes across these, a few notes:
Lastly, Taylor Bryant's starter also includes PurgeCSS which removes all of the unnecessary Tailwind classes from your bundle!
@tailwind preflight
is not a valid at-rule in Tailwind v1.0, use@tailwind base
instead.✅ Correct One
@tailwind base;
@tailwind components;
@tailwind utilities;
Thanks for sharing this! I'll test out this setup with Tailwind 1.0 and update my article accordingly 👍
I'm a fan of Tailwind myself, glad to see another tutorial for setting it up! As a follow-up, have you considering looking into setting up PurgeCSS? It's a popular tool to pair with Tailwind, since it'll find and remove all classes you're not using from the stylesheet.
Hey Max!
A couple people have mentioned that, so I think I'll post another short article on how to set that up. In the meantime, this starter has Tailwind (via PostCSS) and PurgeCSS set up: github.com/taylorbryant/gatsby-sta...
Cool tip, instead of running ./node_modules/.bin/tailwind init you can just run npx tailwind init.
Ooh, that's awesome! Thanks!
Was just thinking about this today! Book marking for later!
thanks jake! this worked great!