W
Windmill9mo ago
Sindre

Remove darkmode from App?

Is there a way to remove darkmode from app? I created a app and customized it a bit to get a better look and feel, but I forgot that windmill has darkmode... And now the look and feel is awefull for toose users. I do not want to support 2 designs. Is there a way to remove the darkmode from the app styles? Is the dark mode inherited from os/browser settings? or do the users need to set the dark mode info in windmill explict? (was not able to find dark mode in the docs)
4 Replies
Faton
Faton9mo ago
Hi, When a user launches Windmill for the first time, the dark mode follows the browser's default settings. Subsequent changes are saved as a cookie. At this time, there's no option to disable dark mode within the app. We're using Tailwind for styling. Depending on the cookie value, we attach a specific class named "dark". For a temporary solution, you can add the following frontend script:
document.documentElement.classList = ""
document.documentElement.classList = ""
Essentially, when the app starts, this script will remove the "dark" class if it's present, ensuring the app displays in light mode. However, this isn't a flawless solution. If a user toggles the dark mode afterward, the app will revert to dark mode.
rubenf
rubenf9mo ago
@Faton I think we could easily add an option "light mode only"
Faton
Faton9mo ago
Yes we can do that in the globals settings. I'll add this to my todo list
Sindre
Sindre9mo ago
Great. This fix will work for all of my users, I do not think any of them changed the windmill darkmode.