Adding Dark Mode to my NextJS 12 Starter Blog
I recently added dark mode to my NextJS 12 starter blog and it was quite a journey. At first, I tried configuring Tailwind CSS to support dark mode, but I kept running into issues. No matter what I tried, I couldn't get it to work properly.
After trying various approaches and debugging for hours, I decided to try uninstalling and reinstalling Tailwind. To my surprise, this actually worked! I'm not sure why, but it seems that starting fresh with a clean installation fixed the issues I was having.
In the end, it was a bit of a pain to get dark mode working with Tailwind, but it was worth it. My blog now has a sleek and modern dark mode that looks great and is easy for users to toggle on and off.
If you're considering adding dark mode to your NextJS blog or website, I recommend giving Tailwind a try. Just keep in mind that you may need to uninstall and reinstall if you run into any issues.