moar docs

This commit is contained in:
Will McGugan
2022-07-30 22:33:55 +01:00
parent 7040d00c7b
commit 99ccbc5eb8
12 changed files with 227 additions and 0 deletions

25
docs/styles/max_width.md Normal file
View File

@@ -0,0 +1,25 @@
# Max-width
The `max-width` rule sets a maximum width for a widget.
## CSS
```sass
/* Set a maximum width of 10 cells */
max-width: 10;
/* Set a maximum width of 25% of the screen width */
max-width: 25vh;
```
## Python
```python
# Set the maximum width to 10 cells
widget.styles.max_width = 10
# Set the maximum width to 25% of the screen width
widget.styles.max_width = "25vw"
```