Use labels instead of static.

This commit is contained in:
Rodrigo Girão Serrão
2023-01-04 11:43:38 +00:00
parent 56e5e39740
commit 454d36cdc7
2 changed files with 3 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ Screen {
color: blue;
}
Static {
Label {
padding: 4 8;
background: blue 20%;
}

View File

@@ -1,5 +1,5 @@
from textual.app import App
from textual.widgets import Static
from textual.widgets import Label
TEXT = """I must not fear.
Fear is the mind-killer.
@@ -12,7 +12,7 @@ Where the fear has gone there will be nothing. Only I will remain."""
class PaddingApp(App):
def compose(self):
yield Static(TEXT)
yield Label(TEXT)
app = PaddingApp(css_path="padding.css")