textual/docs/examples/styles/background.py
Dave Pearson 414096233b
Make all styles reference examples capable of being run standalone
Also move the declarations of the stylesheets into the app classes.

See #3650
2023-11-08 14:37:01 +00:00

16 lines
354 B
Python

from textual.app import App
from textual.widgets import Label
class BackgroundApp(App):
CSS_PATH = "background.tcss"
def compose(self):
yield Label("Widget 1", id="static1")
yield Label("Widget 2", id="static2")
yield Label("Widget 3", id="static3")
if __name__ == "__main__":
app = BackgroundApp()
app.run()