Simple dark/light mode toggle with Nuxt and Tailwind
Not sure what I am doing wrong, but I cannot manage for Tailwind to respect the "dark" class on my "html" element. It's set properly and my tailwind.config.js contains
to no avail.
ChatGPT and other AIs are also not able to create a minimal working project where an element with e.g. classes
darkMode: "class" (tried other values too), but when I inspect my page tailwind still uses prefers-color-scheme selectors. I've also triedto no avail.
ChatGPT and other AIs are also not able to create a minimal working project where an element with e.g. classes
text-black dark:text-white actually works. Any help is much appreciated!