benweet / stackedit

In-browser Markdown editor
https://stackedit.io/
Apache License 2.0
21.48k stars 2.7k forks source link

[Feature request] Automatically enable `colorTheme: dark` on `prefers-color-scheme: dark` #1827

Open KaKi87 opened 1 year ago

KaKi87 commented 1 year ago

Hello,

prefers-color-scheme allows users not to have to manually change theme settings in every webapp they visit when they already set their browser and/or system theme as dark.

Therefore, it would be nice of StackEdit to automatically add colorTheme: dark to settings when prefers-color-scheme: dark is set.

As an alternative I tried to use localStorage.setItem from a userscript, but without success, because of the hash property I suppose.

Thanks