mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Merge pull request #1551 from Textualize/fix-1420
Raise clearer exception when `none` is in a space-separated list of text styles.
This commit is contained in:
@@ -8,13 +8,13 @@ The `<text-style>` CSS type represents styles that can be applied to text.
|
||||
|
||||
## Syntax
|
||||
|
||||
A [`<text-style>`](/css_types/text_style) can be any _space-separated_ combination of the following values:
|
||||
A [`<text-style>`](/css_types/text_style) can be the value `none` for plain text with no styling,
|
||||
or any _space-separated_ combination of the following values:
|
||||
|
||||
| Value | Description |
|
||||
|-------------|-----------------------------------------------------------------|
|
||||
| `bold` | **Bold text.** |
|
||||
| `italic` | _Italic text._ |
|
||||
| `none` | Plain text with no styling. |
|
||||
| `reverse` | Reverse video text (foreground and background colors reversed). |
|
||||
| `strike` | <s>Strikethrough text.</s> |
|
||||
| `underline` | <u>Underline text.</u> |
|
||||
@@ -42,5 +42,5 @@ A [`<text-style>`](/css_types/text_style) can be any _space-separated_ combinati
|
||||
widget.styles.text_style = "strike"
|
||||
|
||||
# You can also combine multiple values
|
||||
widget.styles.text_style = "bold underline italic"
|
||||
widget.styles.text_style = "strike bold italic reverse
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user