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

CSS_PATH is missing in Widget #3823

Closed
mzebrak opened this issue Dec 7, 2023 · 3 comments
Closed

CSS_PATH is missing in Widget #3823

mzebrak opened this issue Dec 7, 2023 · 3 comments

Comments

@mzebrak
Copy link

mzebrak commented Dec 7, 2023

I think it will be very useful if CSS_PATH could be usable in Widget instances also, like it is already available in e.g App or Screen.

You could use live css to create advanced widgets. And I think it would be consistent in general.

This also allows you to make a choice. For example, in our application we try to separate the entire CSS into files - so we have created an appropriate function for this, which is simple and with the oneliner call it searches for a specific CSS file, reads its content and allows it to be inserted into DEFAULT_CSS like DEFAULT_CSS = get_relative_css(__file__). But this means that we are not able to use live reloading for such widgets (could be still workaround by working on the CSS file given in the Screen CSS_PATH).

Copy link

github-actions bot commented Dec 7, 2023

We found the following entry in the FAQ which you may find helpful:

Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.

This is an automated reply, generated by FAQtory

Copy link

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

@mzebrak
Copy link
Author

mzebrak commented Jun 17, 2024

@willmcgugan I see this is now closed without a note - is this idea rejected or will be available anytime soon?

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

2 participants