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

Capture theme color changes made via .add_defaults() #46

Open
gadenbuie opened this issue Aug 19, 2024 · 0 comments
Open

Capture theme color changes made via .add_defaults() #46

gadenbuie opened this issue Aug 19, 2024 · 0 comments

Comments

@gadenbuie
Copy link
Contributor

From https://forum.posit.co/t/compileerror-when-trying-to-customize-a-shiny-theme/189700/6

It'd be reasonable for us to watch for key color values being changed via .add_defaults() to update the .colors property.

from shinyswatch.theme import minty as shiny_theme

shiny_theme = shiny_theme.add_defaults(
    primary="#aa00ff",
    secondary="#bfff00",
)

print(shiny_theme.colors.primary)
# NOT "#aa00ff"
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

1 participant