You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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!
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
.The text was updated successfully, but these errors were encountered: