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

Add support for a "Color scheme" (dark mode/light mode) visibility setting #101

Open
andersnoren opened this issue Apr 8, 2024 · 1 comment
Labels
Enhancement New enhancement or feature request.

Comments

@andersnoren
Copy link

What problem does this address?

In some cases, you might want to hide or show a block depending on whether the visitor has their system appearance settings set to dark mode or light mode.

A recent scenario I've run into is that one set of illustrations (image blocks) with black strokes should be shown to light mode visitors, and another set of illustrations with white strokes should be shown for dark mode visitors.

What is your proposed solution?

Add a "Color scheme" setting allowing you to hide blocks for either "Light mode" or "Dark mode", using prefers-color-scheme.

@Stormrunn3r
Copy link

Hi @andersnoren ,

Great idea! I made an block visibility add-on based on your suggestion. It uses the prefers-color-scheme setting to show or hide blocks depending on whether the user is in dark mode or light mode. You're welcome to try it out and see if it helps!

@ndiego ndiego added the Enhancement New enhancement or feature request. label May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New enhancement or feature request.
Projects
None yet
Development

No branches or pull requests

3 participants