Replies: 1 comment 2 replies
-
|
Thanks It is possible to replicate the actual behavior on the Demo application at https://demo.activeadmin.info/admin/admin_users I'm not sure about the fix, I would avoid to apply inline style edit: I guess that this will be fixed when upgrading to Tailwind V4, which has some new utilities for color-scheme |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
Native datetime pickers and other elements do not change when switching to dark mode and back.
To fix it,
dark_mode_toggle.jsneeds to synchronize the colorScheme property as well as the localStorage key, like this:const setTheme = () => { // On page load or when changing themes, best to add inline in `head` to avoid FOUC if (localStorage.getItem(THEME_KEY) === 'dark' || (!(THEME_KEY in localStorage) && darkModeMedia.matches)) { document.documentElement.classList.add('dark'); + window.document.documentElement.style.colorScheme = 'dark'; } else { document.documentElement.classList.remove('dark'); + window.document.documentElement.style.colorScheme = 'light'; } };Beta Was this translation helpful? Give feedback.
All reactions