more border

This commit is contained in:
Will McGugan
2022-08-04 15:39:06 +01:00
parent fa4b971bff
commit 971ef9e4b1

View File

@@ -1,23 +1,36 @@
# Border # Border
The `border` rule enables the drawing of a box around a widget. A border is set with a border style (see below) followed by a color. The `border` rule enables the drawing of a box around a widget. A border is set with a border value (see below) followed by a color.
- `"ascii"` | Border value | Explanation |
- `"round"` | ------------ | ------------------------------------------------------- |
- `"solid"` | `"ascii"` | A border with plus, hyphen, and vertical bar |
- `"double"` | `"blank"` | A blank border (reserves space for a border) |
- `"dashed"` | `"dashed"` | Dashed line border |
- `"heavy"` | `"double"` | Double lined border |
- `"inner"` | `"heavy"` | Heavy border |
- `"outer"` | `"hidden"` | Alias for "none" |
- `"hkey"` | `"hkey"` | Horizontal key-line border |
- `"vkey"` | `"inner"` | Thick solid border |
- `"tall"` | `"none"` | Disabled border |
- `"wide"` | `"outer"` | Think solid border with additional space around content |
| `"round"` | Rounded corners |
| `"solid"` | Solid border |
| `"tall"` | A solid border with extras space top and bottom |
| `"vkey"` | Vertical key-line border |
| `"wide"` | A solid border with additional space left and right |
For examples `heavy white` would display a heavy white line around a widget. For examples `heavy white` would display a heavy white line around a widget.
Borders may also be set individually with the `border-top`, `border-right`, `border-bottom` and `border-left` rules. Borders may also be set individually for the four edges of a widget with the `border-top`, `border-right`, `border-bottom` and `border-left` rules.
## Border command
The `textual` CLI has a subcommand which will let you explore the various border types:
```
textual borders
```
## Example ## Example