Skip to content

Investigating Inconsistent Config Loading with @tailwindcss/vite #18469

Closed Answered by wongjn
philippedev101 asked this question in Help
Discussion options

You must be logged in to vote

What is happening is that you've configured Tailwind v4 using v3 methods. In v4, the tailwind.config.js is phased out and is not the main container for configuration any more.

V4 has automatic source scanning. Thus, it finds rotate-12 as a string inside tailwind.config.js, not that it loads the safelist as configuration. So, it adds rotate-12 to the CSS output.

So then why does Tailwind not output the classes in index.html, text-3xl, font-bold and text-blue-500? This is because all of these classes rely on named Tailwind theme tokens for --font-size, --font-weight and --color. However, these do not exist in Tailwind compilation runs in your reproduction. This is because you haven't includ…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by philippedev101
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #18468 on July 06, 2025 19:02.