Upgrading to Tailwind v4: Missing Defaults, Broken Dark Mode, and Config Issues #16517
Replies: 2 comments 3 replies
-
Hey!
This isn't true — headings, buttons, lists, etc. have always been completely unstyled in Tailwind. Here is a v3 demo demonstrating that: https://play.tailwindcss.com/5DSGDzqrxj
Can you explain what you mean? You haven't provided any information here about what behavior you are seeing vs. what behavior you are expecting. Dark mode is meant to work the same way as it always has, with the only notable difference being how you configure it when using a CSS-based configuration: https://tailwindcss.com/docs/dark-mode#toggling-dark-mode-manually
Can you provide a reproduction of this?
Can you provide a reproduction of this?
Can you provide a reproduction of this? Happy to resolve any issues if there are bugs here but we can't be much help if you don't follow the issue template and include reproductions of the issues you are facing. |
Beta Was this translation helpful? Give feedback.
-
I have encountered issue 2 where dark mode wasn't working properly. Turned out it's because I did |
Beta Was this translation helpful? Give feedback.
-
Introduction
Hello Tailwind CSS Team and Community,
First off, I want to say that I really appreciate all the hard work that goes into Tailwind CSS. It’s an incredible tool that has improved my workflow tremendously. However, after upgrading to v4, I’ve run into several challenges that have made the transition more difficult than expected.
I completely understand that major updates come with changes, but some of the alterations, such as the removal of default styles, changes to dark mode behavior, and unexpected issues with Tailwind config properties, were not clearly outlined in the upgrade guide. I’ve also noticed that I’m not alone in experiencing these difficulties, as other developers have expressed similar concerns.
What I've Done So Far
tw-
totw:
and moving them to the front).Issues Faced
Loss of Default Styles: Previously, elements like headings and buttons had reasonable defaults. After upgrading, these defaults are gone, which caused a lot of unexpected UI issues. Also the @layer base {} thing does not work. Tried it many times now.
Dark Mode Behavior Changed: Dark mode does not seem to work the same way as it did in v3. If this was an intentional change, could you clarify the best practices for handling it in v4? Should that not be a change set outline in Upgrade docs?

Tailwind Config Custom Properties Not Working: Specific configurations in
tailwind.config.js
, such as:These settings appear in the compiled CSS but do not seem to work properly.
<ul>
) Padding Changes: UL elements that were previously well-spaced now have different padding, affecting layouts unexpectedly.@layer base
Behavior: Even when attempting to reintroduce styles via@layer base
, they are not applying as expected.opacity-0
,opacity-100
,translate-y-0
, etc.) do not behave the same way as before. HOWEVER, I have not fully investigaged this point just yet!Steps Taken
Request for Assistance
I’d love to get some clarification on the following:
Conclusion
I truly appreciate all the work that has gone into Tailwind CSS and understand that updates are necessary for improvement. That said, I believe better documentation and clearer migration steps for these changes would be incredibly helpful for those of us upgrading large projects.
Looking forward to any insights you can provide, and I appreciate your time in addressing these concerns.
Best regards,
Jaques
Beta Was this translation helpful? Give feedback.
All reactions