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

24 lines
703 B
Python

from textual.app import App
from textual.containers import Grid
from textual.widgets import Placeholder
class PaddingAllApp(App):
CSS_PATH = "padding_all.tcss"
def compose(self):
yield Grid(
Placeholder("no padding", id="p1"),
Placeholder("padding: 1", id="p2"),
Placeholder("padding: 1 5", id="p3"),
Placeholder("padding: 1 1 2 6", id="p4"),
Placeholder("padding-top: 4", id="p5"),
Placeholder("padding-right: 3", id="p6"),
Placeholder("padding-bottom: 4", id="p7"),
Placeholder("padding-left: 3", id="p8"),
)
if __name__ == "__main__":
app = PaddingAllApp()
app.run()