themesberg / flowbite-svelte

Official Svelte components built for Flowbite and Tailwind CSS
https://flowbite-svelte.com
MIT License
2.22k stars 272 forks source link

Update Dark Mode documentation for configuring strategy in tailwind.config.js #1311

Closed khiemgluong closed 7 months ago

khiemgluong commented 7 months ago

Describe the bug

I ran into some problems using the 'class' strategy for DarkMode with tailwind.config.js, being that its very inconsistent and sometimes toggle certain elements and sometimes not. That was because as of tailwind 3.4.1, the 'class' strategy has been replaced with 'selector'.

the documentation should add a note on top of of the strategy configuration which mentions this, something like what I wrote below:

The selector strategy replaced the class strategy in Tailwind CSS v3.4.1.

// tailwind.config.cjs
const config = {
  darkMode: 'class' //'selector'
  // ...
};

Reproduction

...

Flowbite version and System Info

flowbite-svelte: 0.45.0
shinokada commented 7 months ago

Thanks. Please use the latest version.