From 03a2e3080ac166f343733790de01bbb52ba75ebf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Gir=C3=A3o=20Serr=C3=A3o?= <5621605+rodrigogiraoserrao@users.noreply.github.com> Date: Thu, 15 Dec 2022 18:09:13 +0000 Subject: [PATCH] Add CSS and Python syntax for individual axis alignment. --- docs/styles/align.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/styles/align.md b/docs/styles/align.md index d3a3927db..028b475ee 100644 --- a/docs/styles/align.md +++ b/docs/styles/align.md @@ -81,8 +81,13 @@ Each label has been aligned differently inside its container, and its text shows ```sass /* Align child widgets to the center. */ align: center middle; -/* Align child widget to th top right */ +/* Align child widget to the top right */ align: right top; + +/* Change the horizontal alignment of the children of a widget */ +align-horizontal: right; +/* Change the vertical alignment of the children of a widget */ +align-vertical: middle; ``` ## Python @@ -91,4 +96,9 @@ align: right top; widget.styles.align = ("center", "middle") # Align child widgets to the top right widget.styles.align = ("right", "top") + +# Change the horizontal alignment of the children of a widget +widget.styles.align_horizontal = "right" +# Change the vertical alignment of the children of a widget +widget.styles.align_vertical = "middle" ```