Repository navigation
How do I enable dark mode using the Tailwind CSS CDN? #16029
|
This method used to work: I'm using Tailwind CSS v4 on a plain HTML page. |
Answered by
john-champ
Jan 30, 2025
Replies: 1 comment 1 reply
|
You will have to use the new CSS configuration as follows: <style type="text/tailwindcss">
/* Class based dark mode */
@variant dark (&:where(.dark, .dark *));
</style> |
1 reply
Answer selected by
wernayasa
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You will have to use the new CSS configuration as follows: