textual-dissect – A tool for dissecting Textual widgets, including default CSS and more #5711
Replies: 3 comments 7 replies
-
This looks awesome. Would you consider this as an addition to textual-dev? Either way, worth posting to show-and-tell |
Beta Was this translation helpful? Give feedback.
-
I concur that this looks awesome - but how do I use it? I downloaded the source and the tree-sitter dependencies but I'm getting hung up with some DeprecationWarnings. I feel like I am misunderstanding something here. Please advise. |
Beta Was this translation helpful? Give feedback.
-
@TomJGooding Can this tool be used to drill down on the default CSS for widget sub-classes? For example, Collapsible > Contents has a default CSS padding: 1 0 0 3; (line 163 of _collapsible.py). I can tell that the sub-class exists from looking at the default CSS for Collapsible but the default CSS for the sub-class doesn't "bubble up" to the widget's default CSS. Thoughts? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
https://github.com/TomJGooding/textual-dissect
The Textual documentation is excellent, but sometimes you need to dig a bit deeper. I regularly found myself having to dive into the source code to check the default CSS for widgets.
textual-dissect
provides quick and easy access to the default CSS and other inner workings of Textual widgets not covered by the documentation. I created this as a personal tool and it is still a work in progress (so isn't available as a PyPI package yet), but thought I would share here in case anyone else might find it useful.Beta Was this translation helpful? Give feedback.
All reactions