Files
textual/docs/styles/text_style.md
Will McGugan 7040d00c7b more docs
2022-07-30 17:01:51 +01:00

37 lines
759 B
Markdown

# Text-style
The `text-style` rule enables a number of different ways of displaying text. The value may be set to any of the following:
- `"bold"` Sets **bold text**
- `"italic"` Sets _italic text_
- `"reverse"` Sets reverse video text (foreground and background colors reversed)
- `"underline"` Sets <u>underline text</u>
- `"strike"` Sets <s>strikethrough text</s>
Text styles may be set in combination. For example "bold underline" or "reverse underline strike".
## Example
=== "text_style.py"
```python
--8<-- "docs/examples/styles/text_style.py"
```
=== "Output"
```{.textual path="docs/examples/styles/text_style.py"}
```
## CSS
```sass
text-style: italic;
```
## Python
```python
widget.styles.text_style = "italic"
```