textual/docs/examples/styles/grid_rows.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

26 lines
553 B
Python

from textual.app import App
from textual.containers import Grid
from textual.widgets import Label
class MyApp(App):
CSS_PATH = "grid_rows.tcss"
def compose(self):
yield Grid(
Label("1fr"),
Label("1fr"),
Label("height = 6"),
Label("height = 6"),
Label("25%"),
Label("25%"),
Label("1fr"),
Label("1fr"),
Label("height = 6"),
Label("height = 6"),
)
if __name__ == "__main__":
app = MyApp()
app.run()