fix borders

This commit is contained in:
Will McGugan
2022-09-18 22:21:50 +01:00
parent 826095727c
commit 0e47da053b

View File

@@ -35,8 +35,8 @@ class BorderButtons(layout.Vertical):
class BorderApp(App): class BorderApp(App):
"""Demonstrates the border styles.""" """Demonstrates the border styles."""
DEFAULT_CSS = """ CSS = """
Static { #text {
margin: 2 4; margin: 2 4;
padding: 2 4; padding: 2 4;
border: solid $secondary; border: solid $secondary;
@@ -48,7 +48,7 @@ class BorderApp(App):
def compose(self): def compose(self):
yield BorderButtons() yield BorderButtons()
self.text = Static(TEXT) self.text = Static(TEXT, id="text")
yield self.text yield self.text
def on_button_pressed(self, event: Button.Pressed) -> None: def on_button_pressed(self, event: Button.Pressed) -> None: