#contact Formular
9 messages · Page 1 of 1 (latest)
But there used to be a tailwindcss thing that was tailwind.config.mejs, but it no longer has it.
tailwind 4 removed the config file, and replaced it with a css based config
https://tailwindcss.com/docs/upgrade-guide
And how would I do if I want to use a toggle to switch between dark mode and light mode, because before I had to add a few things and it worked.
you can for example add this css to your global css file
@custom-variant dark (&:where(.dark, .dark *));
To suppor toggling the class by adding .dark to the root
can you share what you had before?
I meant that before you needed a file tailwind.config.mjs, to be able to use the dark mode, but in this new version it has been removed.
yes, and now in tailwind 4 you'd add your config to a css file you import globally
Ahh, ok, perfect, Thank You