Tailwind CSS Styles Not Applied After Adding SolidJS Routes, Why ?
I encountered an issue after integrating SolidJS routes into my project. I created components for different sections and then imported them into respective pages's compoenent like home.jsx and services.jsx and then imported them into app.jsx , Initially, styles were visible before routing, but after routing, only simple HTML pages were displayed without styling. I'm unsure about where to add routes, as I have both index.jsx and app.js. Seeking assistance to understand why Tailwind CSS is not applied after routing and how to resolve this issue and understanding why Tailwind CSS is not being applied after routing. Below is my js.config.js :
6 Replies
Is tailwind setup correctly?
Do you have postcss setup and the tailwind css file imported?
not sure i just started working with it actaully i am using tailwindcss solid.js template
no , i dont have postcss setup , did that caused this issue?
Yes, you need postcss for tailwind
I've run into the same issue before
ohh , can you please provide reference code or some site link to how to actaully set up postcss in solid.js ?
Just follow the tailwind docs
https://tailwindcss.com/docs/guides/solidjs
Install Tailwind CSS with SolidJS - Tailwind CSS
Setting up Tailwind CSS in a SolidJS project.
dn i setup postcss and now its working , now tailwind css also applied .
thank you
and thank you for telling what can be the reason of the issue i was facing why tailwincss not applied .