Skip to content

How to use lightning css with tailwind 4 #3801

Answered by dwkns
juchom asked this question in Q&A

You must be logged in to vote

I don't think you can in the way you're hoping to. There is no TailwindCSS plugin for LightningCSS

As I understand it (and I could be wrong) the Tailwind CLI uses Lightning as a dependency as does the Tailwind Vite Plugin. So if you want Lightning CSS to process your Tailwind CSS You'll need to use those.

You can use the TailwindCSS CLI in an Eleventy project by running it as a package.json script. It's fast, but it doesn't play nicely with the Eleventy Dev server. You can get reloads when you don't want them and not get them when you do.

You can use eleventy-plugin-vite with Tailwind as plugin. This works OK, but Vite has some strong opinions about how it processes assets in your project…

Replies: 1 comment

You must be logged in to vote
0 replies
Answer selected by juchom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants