Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto dark mode not working #3

Open
brady-sewall opened this issue Jan 9, 2023 · 3 comments
Open

Auto dark mode not working #3

brady-sewall opened this issue Jan 9, 2023 · 3 comments

Comments

@brady-sewall
Copy link

Tested on desktop:
macOS 13.1 Ventura on MacBook Pro

  • Chrome 108
  • Safari 16.2
  • Firefox Developer Edition 109

Tested on mobile:
iOS 16.2 on iPhone 13 Pro Max

  • Chrome 108
  • Safari

Actions taken:

  1. System set to auto light/dark; system is in dark mode = no affect on website
  2. Manually set system to dark mode = no affect on website
@brady-sewall brady-sewall changed the title Dark mode note working on macOS 13.1 Ventura Dark mode not working Jan 9, 2023
@brady-sewall brady-sewall changed the title Dark mode not working Auto dark mode not working Jan 9, 2023
@ctheiss
Copy link

ctheiss commented Feb 5, 2023

Same incorrect behaviour on Win10/Chrome.

image

  • Windows 10 Home 22H2
  • Chrome 109.0.5414.120 (Official Build) (64-bit)

Dark mode media query tested in console (see screenshot above).

@ctheiss
Copy link

ctheiss commented Feb 17, 2023

I believe to fix this, just add

darkMode: 'media',

to tailwind.config.js, per https://flowbite.com/docs/customize/dark-mode/#enable-dark-mode

@brady-sewall
Copy link
Author

I believe to fix this, just add

darkMode: 'media',

to tailwind.config.js, per https://flowbite.com/docs/customize/dark-mode/#enable-dark-mode

More specifically, add what @ctheiss suggested and then compile updated Tailwind CSS + Flowbite. Works great now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants