themesberg / themesberg/flowbite

Light mode toggle not working when browser is in dark mode

Open
#467 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
9.4k
Forks
862
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
I have a similar issue as described in issue #145 when I use the code shown here: https://flowbite.com/docs/customize/dark-mode/

To Reproduce
Steps to reproduce the behavior:

  1. Set browser/os to dark mode
  2. Toggle light mode
  3. Dark mode is still shown

Expected behavior
It should show light mode.

Desktop (please complete the following information):

  • OS: macos
  • Browser: chrome
  • Version: 110

Smartphone (please complete the following information):

  • Device: iPhone 14
  • OS: iOS 16
  • Browser safari
  • Version 16.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the dark-mode implementation shown in the linked Flowbite documentation and reproduce the behavior with the reported browser and OS settings. Trace how the light-mode toggle interacts with the system dark preference; done means selecting light mode visibly produces the light theme in that scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
tailwindcss
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.