nuxt-modules / color-mode

Dark and Light mode with auto detection made easy with Nuxt 🌗
https://color-mode.nuxtjs.org
MIT License
1.12k stars 112 forks source link

Color of element stuck in 1 color. #247

Closed max-fletcher closed 7 months ago

max-fletcher commented 7 months ago

Hello. I recently tried out this module, and when I apply a class like this on an element: <div class="bg-white dark:bg-black">Dummy Text</div> the element is always stuck in dark mode(i.e always black), even when I use the "$colorMode.preference" inside the script tags or used "colorMode: { preference: 'light' }" inside nuxt.config.ts to change the preference value around. I tried to look through the tailwind docs when I realized that they replaced their class strategy with a new strategy called "selector strategy". That might be the issue but I'm not sure about that. So its either I'm missing something, or this change in tailwind caused this to not work. I would love some feedback if you can give me that as it would help me greatly. BTW sorry for asking this here since the discord and other nuxt communities are as dry as a lemon.