darekkay / static-marks

Shareable bookmarks
https://darekkay.com/static-marks
MIT License
422 stars 31 forks source link

Force dark mode? #34

Open halbrd opened 2 years ago

halbrd commented 2 years ago

I use dark colour schemes on all of my devices.

On some of them, the prefers-colour-scheme: dark handling doesn’t work (or only works after a refresh). I believe this is due to bugs outside of my control in the system or browser software.

Is there a way to hardcode my static marks page to always use the dark theme?

darekkay commented 2 years ago

Hey @halbrd ,

right now Static Marks relies on prefers-color-scheme alone, but the code is prepared to support a theme switcher in the future. This means you can set the color scheme in localStorage by running the following in the browser DevTools console and reloading the page:

localStorage.setItem("theme", "dark")

I think a proper theme switcher is the right solution to your issue, but as of now I don't have a roadmap for this feature.