Light/dark mode toggle is illogical/buggy

Dark/Light Mode Toggle was released in core but it is illogical/buggy. I would like to offer light and dark themes and show the toggle always to all users. Default would be automatic setting based on device preference.

To get the toggle to show I need to:

  • Set site default dark color scheme ID in settings to correct dark scheme
  • Enable interface color selector to header or sidebar
  • Set theme default color scheme to light scheme (if dark, not visible to logged out users)

This will show the toggle for logged out users. However, to show the toggle for logged in users, the user needs to:

  • From user settings change color scheme to light
  • From user settings enable “automatic dark mode color palette”

Now the toggle is visible and can be used to switch between dark/light schemes. If the user changes the scheme to light in the user settings the toggle will disappear.

To go around this, I could only set the light theme to be selectable for users but then the user would still need to enable “automatic dark mode color palette” from the settings to show the toggle.

As a summary, the switch is only visible if scheme set to light (system default or user setting). This is confusing for the users.

1 Like