Skip to content

Fix theme logic #93

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

Merged
merged 1 commit into from
Apr 15, 2025
Merged

Fix theme logic #93

merged 1 commit into from
Apr 15, 2025

Conversation

curtis-allan
Copy link
Contributor

Tiny PR to address theme loading issues. Currently when changing the theme via the modal, it saves to localStorage correctly but both the default theme and the localStorage preference are added to the html tag. This is causing conflicts where certain themes are overriding others.

Removing the additional htmlElement.classList.add("uk-theme-{color}"); snippet ensures the theme matches the option set in storage, or uses to the default if none is set. This is how it's documented in FrankenUI, so I'm guessing it was added on purpose - let me know the functionality you were aiming for and we can try to find another solution!

@curtis-allan curtis-allan added the enhancement New feature or request label Apr 12, 2025
@curtis-allan curtis-allan self-assigned this Apr 12, 2025
Copy link

gitnotebooks bot commented Apr 12, 2025

Found 1 changed notebook. Review the changes at https://app.gitnotebooks.com/AnswerDotAI/MonsterUI/pull/93

@Isaac-Flath
Copy link
Collaborator

Thank you!

@Isaac-Flath Isaac-Flath merged commit c6c6396 into main Apr 15, 2025
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

Successfully merging this pull request may close these issues.

2 participants