Skip to content

Conversation

@ZibanPirate
Copy link
Member

@ZibanPirate ZibanPirate commented Apr 12, 2025

The bug:

clear the cookie and load the website on a system that has light theme preferred

Expected:
you should get light mode

Actual:
you get dark mode

Fix:

when loading the theme from cookie, if no theme is found, try detecting user-prefered theme, and then fallback to dark mode

NOTE

also changed the code a bit, to allow for non-binary options, like having a thrid auto-detect option, or other theme names

  • Bug fix
  • New feature
  • Other

@github-actions github-actions bot added fix web Web related changes ( web folder ) labels Apr 12, 2025
@ZibanPirate ZibanPirate requested a review from a team April 12, 2025 10:49
@ZibanPirate ZibanPirate marked this pull request as ready for review April 12, 2025 10:49
@ZibanPirate ZibanPirate enabled auto-merge April 12, 2025 10:51
@ZibanPirate ZibanPirate merged commit 6af62bc into main Apr 12, 2025
30 checks passed
@ZibanPirate ZibanPirate deleted the fix/fallback-to-user-pref-insteadof-dark-mode branch April 12, 2025 10:54
@github-project-automation github-project-automation bot moved this to Merged in DzCode i/o Apr 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix web Web related changes ( web folder )

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

3 participants