textual/docs/examples/styles/content_align.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
432 B
Python

from textual.app import App
from textual.widgets import Label
class ContentAlignApp(App):
CSS_PATH = "content_align.tcss"
def compose(self):
yield Label("With [i]content-align[/] you can...", id="box1")
yield Label("...[b]Easily align content[/]...", id="box2")
yield Label("...Horizontally [i]and[/] vertically!", id="box3")
if __name__ == "__main__":
app = ContentAlignApp()
app.run()