mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add example with all padding types.
This commit is contained in:
20
docs/examples/styles/padding_all.py
Normal file
20
docs/examples/styles/padding_all.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from textual.app import App
|
||||
from textual.containers import Container, Grid
|
||||
from textual.widgets import Placeholder
|
||||
|
||||
|
||||
class PaddingAllApp(App):
|
||||
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"),
|
||||
)
|
||||
|
||||
|
||||
app = PaddingAllApp(css_path="padding_all.css")
|
||||
Reference in New Issue
Block a user