-
Guys, I have been playing around with the alpha version of tailwind and I was trying to implement dark mode. The default strategy of setting dark theme based on prefers-color-scheme works well. And I am now trying to implement the manual strategy (giving user the ability to change theme). You can see in the below image that I tried applying dark class to html element but to no avail. Since I am trying this in React, apart from window.load, I have tried useLayoutEffect as well to add the dark class to the html element. I have been told that the alpha version of tailwind does not support config file. Can someone please tell me how I can go about the dark theme feature in the alpha version of tailwind? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Only the media query version of dark mode is supported in v4 at the moment. As per the release blog post:
Also, #13772 (comment) |
Beta Was this translation helpful? Give feedback.
-
Try this: #13772 (comment) |
Beta Was this translation helpful? Give feedback.
Only the media query version of dark mode is supported in v4 at the moment. As per the release blog post:
Also, #13772 (comment)