Files
textual/docs/styles/max_height.md
Will McGugan 99ccbc5eb8 moar docs
2022-07-30 22:33:55 +01:00

26 lines
399 B
Markdown

# Max-height
The `max-height` rule sets a maximum width for a widget.
## CSS
```sass
/* Set a maximum height of 10 rows */
max-height: 10;
/* Set a maximum height of 25% of the screen height */
max-height: 25vh;
```
## Python
```python
# Set the maximum width to 10 rows
widget.styles.max_height = 10
# Set the maximum width to 25% of the screen width
widget.styles.max_height = "25vw"
```