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/min_width.md
Normal file
25
docs/styles/min_width.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Min-width
|
||||
|
||||
The `min-width` rules sets a minimum width for a widget.
|
||||
|
||||
## CSS
|
||||
|
||||
```sass
|
||||
|
||||
/* Set a minimum width of 10 cells */
|
||||
min-width: 10;
|
||||
|
||||
/* Set a minimum width of 25% of the screen width */
|
||||
min-width: 25vh;
|
||||
```
|
||||
|
||||
## Python
|
||||
|
||||
```python
|
||||
# Set the minimum width to 10 cells
|
||||
widget.styles.min_width = 10
|
||||
|
||||
# Set the minimum width to 25% of the screen height
|
||||
widget.styles.min_width = "25vh"
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user