mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
words and tables
This commit is contained in:
@@ -5,7 +5,7 @@ from textual.widgets import Static
|
|||||||
class BackgroundApp(App):
|
class BackgroundApp(App):
|
||||||
CSS = """
|
CSS = """
|
||||||
Static {
|
Static {
|
||||||
height:1fr;
|
height: 1fr;
|
||||||
content-align: center middle;
|
content-align: center middle;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ The `border` rule enables the drawing of a box around a widget. A border is set
|
|||||||
| `"outer"` | Think solid border with additional space around content |
|
| `"outer"` | Think solid border with additional space around content |
|
||||||
| `"round"` | Rounded corners |
|
| `"round"` | Rounded corners |
|
||||||
| `"solid"` | Solid border |
|
| `"solid"` | Solid border |
|
||||||
| `"tall"` | A solid border with extras space top and bottom |
|
| `"tall"` | Solid border with extras space top and bottom |
|
||||||
| `"vkey"` | Vertical key-line border |
|
| `"vkey"` | Vertical key-line border |
|
||||||
| `"wide"` | A solid border with additional space left and right |
|
| `"wide"` | Solid border with additional space left and right |
|
||||||
|
|
||||||
For examples `heavy white` would display a heavy white line around a widget.
|
For example `heavy white` would display a heavy white line around a widget.
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
|||||||
@@ -2,22 +2,27 @@
|
|||||||
|
|
||||||
The `outline` rule enables the drawing of a box around a widget. Similar to `border`, but unlike border, outline will draw over the content area. This rule can be useful for emphasis if you want to display a outline for a brief time to draw the user's attention to it.
|
The `outline` rule enables the drawing of a box around a widget. Similar to `border`, but unlike border, outline will draw over the content area. This rule can be useful for emphasis if you want to display a outline for a brief time to draw the user's attention to it.
|
||||||
|
|
||||||
An outline is set with a border style (see below) followed by a color.
|
An outline 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"` | Solid border with extras space top and bottom |
|
||||||
|
| `"vkey"` | Vertical key-line border |
|
||||||
|
| `"wide"` | Solid border with additional space left and right |
|
||||||
|
|
||||||
For examples `heavy white` would display a heavy white line around a widget.
|
For example `heavy white` would display a heavy white line around a widget.
|
||||||
|
|
||||||
Outlines may also be set individually with the `outline-top`, `outline-right`, `outline-bottom` and `outline-left` rules.
|
Outlines may also be set individually with the `outline-top`, `outline-right`, `outline-bottom` and `outline-left` rules.
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,16 @@
|
|||||||
# Overflow
|
# Overflow
|
||||||
|
|
||||||
The `overflow` rule specifies if and when scrollbars should be displayed on the `x` and `y` axis. There are two values for each scrollbar, which may be set together or independently to one of the follow three values:
|
The `overflow` rule specifies if and when scrollbars should be displayed on the `x` and `y` axis. The rule takes two overflow values; one for the horizontal bar (x axis), followed by the vertical bar (y-axis).
|
||||||
|
|
||||||
- `"auto"` Automatically show the scrollbar if the content doesn't fit
|
| Overflow value | Effect |
|
||||||
- `"hidden"` Never show the scrollbar
|
| -------------- | ------------------------------------------------------------------------- |
|
||||||
- `"scroll"` Always show the scrollbar
|
| `"auto"` | Automatically show the scrollbar if the content doesn't fit (the default) |
|
||||||
|
| `"hidden"` | Never show the scrollbar |
|
||||||
|
| `"scroll"` | Always show the scrollbar |
|
||||||
|
|
||||||
The default is "auto" which will show the scrollbar if content doesn't fit within container, otherwise the scrollbar will be hidden.
|
The default value for overflow is `"auto auto"` which will show scrollbars automatically for both scrollbars if content doesn't fit within container.
|
||||||
|
|
||||||
|
Overflow may also be set independently by setting the `overflow-x` rule for the horizontal bar, and `overflow-y` for the vertical bar.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user