mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
more docs
This commit is contained in:
37
docs/styles/scrollbar_size.md
Normal file
37
docs/styles/scrollbar_size.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# Scrollbar-size
|
||||
|
||||
The `scrollbar-size` rule changes the size of the scrollbars. It takes 2 integers for horizontal and vertical scrollbar size respectively.
|
||||
|
||||
The scrollbar dimensions may also be set individually with `scrollbar-size-horizontal` and `scrollbar-size-vertical`.
|
||||
|
||||
## Example
|
||||
|
||||
In this example we modify the size of the widgets scrollbar to be _much_ larger than usual.
|
||||
|
||||
=== "scrollbar_size.py"
|
||||
|
||||
```python
|
||||
--8<-- "docs/examples/styles/scrollbar_size.py"
|
||||
```
|
||||
|
||||
=== "Output"
|
||||
|
||||
```{.textual path="docs/examples/styles/scrollbar_size.py"}
|
||||
```
|
||||
|
||||
## CSS
|
||||
|
||||
```sass
|
||||
/* Set horizontal scrollbar to 10, and vertical scrollbar to 4 */
|
||||
Widget {
|
||||
scrollbar-size: 10 4;
|
||||
}
|
||||
```
|
||||
|
||||
## Python
|
||||
|
||||
```python
|
||||
# Set horizontal scrollbar to 10, and vertical scrollbar to 4
|
||||
widget.styles.horizontal_scrollbar = 10
|
||||
widget.styles.vertical_scrollbar = 10
|
||||
```
|
||||
Reference in New Issue
Block a user