From acd56c6f7f470b337420d510822fb33f27284841 Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Fri, 26 Aug 2022 12:38:53 +0100 Subject: [PATCH] Initial docs for text-justify CSS property --- docs/styles/text_justify.md | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 docs/styles/text_justify.md diff --git a/docs/styles/text_justify.md b/docs/styles/text_justify.md new file mode 100644 index 000000000..b0cfcdf25 --- /dev/null +++ b/docs/styles/text_justify.md @@ -0,0 +1,40 @@ +# Text-justify + +The `text-justify` rule justifies text within a widget. + +## Syntax + +``` +text-justify: [left|center|right|full]; +``` + +### Values + +| Value | Description | +|----------|-------------------------------------| +| `left` | Left justifies text in the widget | +| `center` | Center justifies text in the widget | +| `right` | Right justifies text in the widget | +| `full` | Fully justifies text in the widget | + +## Example + +In this example, we can see, from top to bottom, + `left`, `center`, `right`, and `full` justified text respectively. + +=== "text_justify.py" + + ```python + --8<-- "docs/examples/styles/text_justify.py" + ``` + +=== "text_justify.css" + + ```css + --8<-- "docs/examples/styles/text_justify.css" + ``` + +=== "Output" + + ```{.textual path="docs/examples/styles/text_justify.py"} + ```