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

[FEATURE] possible to load/unload css files? #3916

Open
kraanzu opened this issue Dec 21, 2023 Discussed in #3907 · 1 comment
Open

[FEATURE] possible to load/unload css files? #3916

kraanzu opened this issue Dec 21, 2023 Discussed in #3907 · 1 comment
Labels
enhancement New feature or request Task

Comments

@kraanzu
Copy link

kraanzu commented Dec 21, 2023

Discussed in #3907

Originally posted by kraanzu December 20, 2023
I'm trying to make a theme changer and I'm currently using classes (like .theme-name) to override the color/styles in a widget but is there a way to dynamically load/unload css files?

I looked into the action_toggle_dark which also uses classnames.
Textual is able to determine any file changes in the CSS file, but It'd be great if I can change the CSS_PATH on demand :D

@willmcgugan
Copy link
Collaborator

Not currently. But its not a bad idea.

@Textualize Textualize deleted a comment from github-actions bot Dec 21, 2023
@rodrigogiraoserrao rodrigogiraoserrao added enhancement New feature or request Task labels Dec 21, 2023
@kraanzu kraanzu changed the title possible to load/unload css files? [FEATURE] possible to load/unload css files? Dec 22, 2023
kraanzu added a commit to kraanzu/smassh that referenced this issue Dec 25, 2023
This is a dirty hack until there's an official solution for Textualize/textual#3916
:D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Task
Projects
None yet
Development

No branches or pull requests

3 participants