Official guidance on building separate CSS files per website section? #17387
Unanswered
ecole-du-web
asked this question in
Help
Replies: 1 comment 1 reply
-
You could have separate CSS input files for each section. Disable automatic source detection in each of them and then explicitly specify source paths per each section in each respective CSS file. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Tailwind team 👋
I’m using Tailwind CSS v4 and trying to build separate CSS files for different parts of my app (
blog.css
,dashboard.css
, etc.), each one containing only the utility classes used in that section.In v3, this was possible using the CLI
--content
flag. In v4, it seems that all builds are expected to be unified.Is there an officially recommended way to build multiple Tailwind CSS outputs with custom content sources per file, without ending up with one global
app.css
?(If this is already addressed somewhere and I missed it, feel free to point me in the right direction — maybe @adamwathan or someone from the team knows if there’s a recommended setup?)
Thanks for any clarification!
Beta Was this translation helpful? Give feedback.
All reactions