Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • W WebApps
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • TurrisTurris
  • WebApps
  • Merge requests
  • !16

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

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Karel Koci requested to merge dark-mode-autodetect into master Sep 09, 2021
  • Overview 4
  • Commits 2
  • Pipelines 0
  • Changes 2

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 Sep 15, 2021 by Aleksandr Gumroian
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: dark-mode-autodetect