mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
759 B
759 B
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 underline text"strike"Setsstrikethrough text
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
text-style: italic;
Python
widget.styles.text_style = "italic"