Two Tailwind v4 CSS files, only styles of the last-linked file work #15989
Unanswered
michielvandermeer
asked this question in
Help
Replies: 1 comment
-
I second this question. I wanted to split up the preflight and the rest of Tailwind's features into separate CSS files and it also worked only in one file at a time for me. I used the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a components project that generates its own Tailwind output CSS. I use that shared project in all my other projects so that I have a single source of my components. Each of my application projects build their own Tailwind CSS file as well for the styles specific to that application.
I include the two Tailwind files in my HTML like this:
I recently upgraded to Tailwind v4 and now my component styles are not loaded anymore.
I suspect it has to do with the
@layer theme, base, components, utilities;
directive on top of the Tailwind output files. I think this resets the layers when loading the second file.Any help would be much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions