mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
moar docs
This commit is contained in:
25
docs/styles/max_height.md
Normal file
25
docs/styles/max_height.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# 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"
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user