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

darkMode default behaviour #404

Closed
alexandr-bbm opened this issue Jan 10, 2020 · 2 comments
Closed

darkMode default behaviour #404

alexandr-bbm opened this issue Jan 10, 2020 · 2 comments

Comments

@alexandr-bbm
Copy link

alexandr-bbm commented Jan 10, 2020

Hi there, and thanks for the library and recent update with darkMode.

I wanted to report very possible undesired effect of current default darkMode property value. Now, as per readme, it is set to true if the browser reports if the browser reports prefers-color-scheme: dark. I think that a huge amount of projects using this nice lib doesn't support theming (like mine). Then, if a user of the app has dark theme enabled in OS, but site has white background, emoji-mart would lead to regression

The pictures below show what happened in my project

before
image

after
image

I think emoji-mart shouldn't get default value for the darkMode from the browser/OS settings, as it seems to much responsibility for the widget lib and it can cause significant visual regression in the apps which do not support theming.

@EtienneLem
Copy link
Member

Good point. darkMode probably is more of a “breaking” change than we anticipated. I think it could be 2 props:

  • autoDarkMode: False by default. When true, it’ll use prefers-color-scheme: dark
  • darkMode: False by default. When true, forces dark theme. Could even be theme: 'dark' which would be a first step at providing more themes.

@rugk
Copy link

rugk commented Mar 5, 2020

IMHO your screenshots look not that bad. It's a little unexpected to have a dark/themed version there, but well...

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

3 participants