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

20 lines
582 B
Python

from textual.app import App
from textual.widgets import Static
class GridApp(App):
CSS_PATH = "grid.tcss"
def compose(self):
yield Static("Grid cell 1\n\nrow-span: 3;\ncolumn-span: 2;", id="static1")
yield Static("Grid cell 2", id="static2")
yield Static("Grid cell 3", id="static3")
yield Static("Grid cell 4", id="static4")
yield Static("Grid cell 5", id="static5")
yield Static("Grid cell 6", id="static6")
yield Static("Grid cell 7", id="static7")
if __name__ == "__main__":
app = GridApp()
app.run()