rich.padding¶
- class rich.padding.Padding(renderable, pad=(0, 0, 0, 0), *, style='none', expand=True)[source]¶
Draw space around content.
Example
>>> print(Padding("Hello", (2, 4), style="on blue"))
- Parameters
renderable (RenderableType) – String or other renderable.
pad (Union[int, Tuple[int]]) – Padding for top, right, bottom, and left borders. May be specified with 1, 2, or 4 integers (CSS style).
style (Union[str, Style], optional) – Style for padding characters. Defaults to “none”.
expand (bool, optional) – Expand padding to fit available width. Defaults to True.