From a7c09d278a38dc578c584149f6fc00bd5dd1cc54 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Tue, 10 Mar 2020 22:30:11 +0000 Subject: [PATCH] docstring --- rich/style.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/rich/style.py b/rich/style.py index 3b7318ec..818070d0 100644 --- a/rich/style.py +++ b/rich/style.py @@ -23,7 +23,26 @@ class _Bit: class Style: - """A terminal style.""" + """A terminal style. + + A terminal style consists of a color (`color`), a backround color (`bgcolor`), and a number of attributes, such + as bold, italic etc. The attributes have 3 states: they can either be on + (``True``), off (``False``), or not set (``None``). + + Args: + color (Union[Color, str], optional): Color of terminal text. Defaults to None. + bgcolor (Union[Color, str], optional): Color of terminal background. Defaults to None. + bold (bool, optional): Enable bold text. Defaults to None. + dim (bool, optional): Enable dim text. Defaults to None. + italic (bool, optional): Enable italic text. Defaults to None. + underline (bool, optional): Enable underlined text. Defaults to None. + blink (bool, optional): Enabled blinking text. Defaults to None. + blink2 (bool, optional): Enable fast blinking text. Defaults to None. + reverse (bool, optional): Enabled reverse text. Defaults to None. + conceal (bool, optional): Enable concealed text. Defaults to None. + strike (bool, optional): Enable strikethrough text. Defaults to None. + + """ _color: Optional[Color] _bgcolor: Optional[Color]