Tailwind CSS variables based on light/dark mode
I'm importing my Sass styling into Tailwind and the structure is roughly
I have another section in my Chrome extension that has a toggle, something like
How do I make the equivalent in Tailwind?
2 Replies
Simple dark mode support with Tailwind & CSS variables - Invertase
Using CSS variables you can easily create a custom set of Tailwind classes to easily support dark mode.
Thanks! Though someone provided me with a better solution: