-
Notifications
You must be signed in to change notification settings - Fork 818
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
Terminal default coloring with textual CSS #5452
Comments
Perhaps I haven't understood what you mean by "default" colors, but you can preserve ANSI colors in inline apps? This FAQ might be relevant here? https://textual.textualize.io/FAQ/#why-doesnt-textual-support-ansi-themes |
If I run> from textual.app import App, ComposeResult
from textual.widgets import Label
class Test(App):
def compose(self) -> ComposeResult:
yield Label( "[on default] " )
yield Label( "[on default] 0123456789 " )
yield Label( "[on default] " )
if __name__ == "__main__":
Test().run(ansi_color=True, inline=True, inline_no_clear=True) I get different result in both foreground and background styling than > from rich import print as rprint
rprint( "[on default] " )
rprint( "[on default] 0123456789 " )
rprint( "[on default] " ) |
Perhaps I'm still missing something, could you include some screenshots to help show what you mean? |
I had edited the wrong test file arghh. You are correct, that technically resolves the issue in the app constructor. Is it undesired UI or difficult to add this capability to TCSS as mentioned above? If so, I happily (or you may) close this request. |
I'm not a maintainer, but this seems an intentional design decision based on the FAQ linked above |
Closing as technically provided per discussion. |
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
Wishlist
When using Rich one can set "default on default" as a means to preserve the native terminal color presence. It would useful, especially for inline mode, to have a TCSS styling mechanism that maintains the same Rich default coloring behavior.
Possible Solution
A possible scenario that is somewhat semantically consistent might be to add as valid a 'none' value to both color and background styles.
Example
The text was updated successfully, but these errors were encountered: