File size: 445 Bytes
5b76e0f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | # Max-height
The `max-height` rule sets a maximum height for a widget.
## Syntax
```
max-height: <SCALAR>;
```
## 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 height to 10 rows
widget.styles.max_height = 10
# Set the maximum height to 25% of the screen height
widget.styles.max_height = "25vh"
```
|