Skip to content

js/dark-mode-switch: use color-scheme detection for theme as well

Karel Koci requested to merge dark-mode-autodetect into master

The color scheme suggestion from system/browser was used to select correct icon but not to select theme. This changes that. Now it also influences the theme of page itself. The change required change of local storage save content. The reason is because we want to use it to store change from default, not only just enable of dark theme. Because of that it was also renamed. Note that once user touches the switch it chooses explicitly so there is no way to revert to auto-detection other than removing local storage.

Implements: #17 (closed)

Edited by Aleksandr Gumroian

Merge request reports