Open Praveen0369 opened 1 year ago
Hi I'm not sure if I uderstand correctly. We do not support adding the dark
class to a single element. Some of the components have content that is added at the end of body (like Select, Datepicker, Timepicker) and that would make the darkmode not to work properly.
If you want to change the theme, add (or remove) the dark
class to the html
element if you are using the darkMode: "class"
setting in tailwind.config.js
.
Dark mode class not working with Chrome's default dark theme. As a user, I would expect the darkMode class to consistently apply dark styles regardless of the browser's default theme. If possible, adjustments to the darkMode class or additional guidance on handling default browser themes could help address this issue.
To Reproduce Steps to reproduce the behavior:
Expected behavior When using the darkMode class to enable dark theme on my site, the dark styles should be applied consistently across different themes, including Chrome's default dark theme
Actual behavior The dark mode styles, applied using the darkMode class, are not functioning correctly when Chrome's default dark theme is active. The styles are not being applied as expected, leading to inconsistent appearance and conflicts with other div elements intended for dark themes.
Show your code `<div className={darkMode ? "dark" : "light"} >
Praveen Prabhakaran
Developer and Designer
Eager fresher seeking dynamic work environment to apply skills, learn, and contribute effectively. Adaptable, motivated, and ready to make a positive impact