textual/docs/examples/styles/min_height.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
509 B
Python

from textual.app import App
from textual.containers import Horizontal
from textual.widgets import Placeholder
class MinHeightApp(App):
CSS_PATH = "min_height.tcss"
def compose(self):
yield Horizontal(
Placeholder("min-height: 25%", id="p1"),
Placeholder("min-height: 75%", id="p2"),
Placeholder("min-height: 30", id="p3"),
Placeholder("min-height: 40w", id="p4"),
)
if __name__ == "__main__":
app = MinHeightApp()
app.run()