Use case: as a user I switch dark/light OS themes often, maybe automatically. Mac OS has such a setting, Linux can be configured like that, too. I don’t want to manually switch dark/light themes in Joplin, but I’d like it to honor my OS setting.
This requires a setting to do that, plus 2 more settings for a default dark/light theme.
Other apps that support this are eg. Firefox and Visual Studio Code.
Electron supports it.
I’m happy to start implementing it if we figure out UX.
Let’s specify it a bit more. Are there any examples of existing apps that support system dark/light theme, but also have custom themes? How do they handle this? What you suggested would work, and I can think of other ways too, but I’m wondering if there’s some more or less accepted standard for this.
After some testing, it turned out that this feature is broken on Linux, but may be repaired in the future.
Also doesn’t work on VS Code which uses prefers-color-scheme media query. I tested nativeTheme Electron API and it’s also broken.
It’s probably this Chromium bug. But still, it’s worth doing since it’ll work on Mac & Windows and Chromium may be fixed.
Yes that's fine. Unfortunately we have to disable some features now and then for Linux (desktop) as it's much harder to get things working on this platform.
A great option may also be to a add a settings button, or even a keyboard shortcut, to quickly toggle the dark/light theme. userchrome.css and userstyle.css may be split in userchrome_light.css + userstyle_light.css and userchrome_dark.css + userstyle_dark.css.