Use labels instead of statics.

This commit is contained in:
Rodrigo Girão Serrão
2023-01-04 10:34:22 +00:00
parent dceeb80bcd
commit 0fe5a98033
2 changed files with 3 additions and 3 deletions

View File

@@ -2,7 +2,7 @@ Screen {
background: white;
color: black;
}
Static {
Label {
margin: 4 8;
background: green 20%;
outline: wide green;

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.
@@ -13,7 +13,7 @@ Where the fear has gone there will be nothing. Only I will remain."""
class OutlineApp(App):
def compose(self):
yield Static(TEXT)
yield Label(TEXT)
app = OutlineApp(css_path="outline.css")