-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Add a Label widget #1193
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
Add a Label widget #1193
Conversation
For the moment this does nothing more than inherit from a Static; but what it does do is make it easier for someone to add text to their application and to style it by styling all the Labels. Before now it would be common to use a Static but if you try and style (or query) all Statics, you'd also get things like Buttons, which inherit from Static. See Textualize#1190
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
|
This feels weird... |
Obviously, hence classes and styles and the like in CSS. This early split between a more "baseline" renderable container and a more "has a specific job" renderable container isn't about reducing or eliminating that sort of work (which, as we both know, would be very little anyway), it just starts to set up what seems like a fairly natural split between a basic renderable container that's about showing text, and more involved widgets. It's possible that at some point in the near future
I'm not really seeing much value in emitting warnings for this. As it stands, using |
willmcgugan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one request for a doc tweak.
For the moment this does nothing more than inherit from a Static; but what it does do is make it easier for someone to add text to their application and to style it by styling all the Labels. Before now it would be common to use a Static but if you try and style (or query) all Statics, you'd also get things like Buttons, which inherit from Static.
See #1190