Add example for grid-gutter.

This commit is contained in:
Rodrigo Girão Serrão
2022-12-19 18:42:28 +00:00
parent d0e3734f30
commit 50ee4e57f2
2 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
Grid {
grid-size: 2 4;
grid-gutter: 1 2 /* (1)! */
}
Label {
border: round white;
content-align: center middle;
width: 100%;
height: 100%;
}

View File

@@ -0,0 +1,20 @@
from textual.app import App
from textual.containers import Grid
from textual.widgets import Label
class MyApp(App):
def compose(self):
yield Grid(
Label("1"),
Label("2"),
Label("3"),
Label("4"),
Label("5"),
Label("6"),
Label("7"),
Label("8"),
)
app = MyApp(css_path="grid_gutter.css")