Open
Description
In part prompted by the start of work on #1748: it's time to think about a style guide, and an actual implementation of styles, for interactive Textual widgets in relation to being enabled/disabled and focused/unfocused. The main aims should be that a user of a Textual application can:
- See at a glance which widgets are enabled
- See at a glance which widgets are disabled
- See at a glance which widgets that have their own "cursor" are focused and where the cursor is
- See at a glance which widgets that have their own "cursor" are unfocused and where the cursor is
There should probably be an overlap here too. It would make sense, I think, for a Tree
or a DataTable
to have no focus, be disabled, but also have content and have a cursor highlighting something; done in a way that it's obvious that it's disabled and not just lacking focus.
Things to consider:
- The styling should be as universal as possible
- It should be possible to theme it (when themes become a thing)
- It should work for both dark and light mode
- It should always be easy for a developer to override it