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

Limit allowed color modes to a set of values (whitelist) #194

Open
Pyrodash opened this issue May 17, 2023 · 0 comments
Open

Limit allowed color modes to a set of values (whitelist) #194

Pyrodash opened this issue May 17, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@Pyrodash
Copy link

Is your feature request related to a problem? Please describe.

Yes, since the user's preferred color mode is stored in localStorage, it can be modified manually with a theme which does not exist, rather than falling back to one which does.

Describe the solution you'd like

I believe it would be helpful if there could be an array whitelist for allowed themes/color modes in the module's configuration, and when the parsed preference is not any of them, the library can reset the user's preference to the configured fallback.

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

No branches or pull requests

1 participant