mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add examples for min/max width/height.
This commit is contained in:
16
docs/examples/styles/max_height.py
Normal file
16
docs/examples/styles/max_height.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from textual.app import App
|
||||
from textual.containers import Horizontal
|
||||
from textual.widgets import Placeholder
|
||||
|
||||
|
||||
class MaxHeightApp(App):
|
||||
def compose(self):
|
||||
yield Horizontal(
|
||||
Placeholder("max-height: 10w", id="p1"),
|
||||
Placeholder("max-height: 999", id="p2"),
|
||||
Placeholder("max-height: 50%", id="p3"),
|
||||
Placeholder("max-height: 10", id="p4"),
|
||||
)
|
||||
|
||||
|
||||
app = MaxHeightApp(css_path="max_height.css")
|
||||
Reference in New Issue
Block a user