From fb42d7c2a4cc82446b06a9b8922819a42445ddf7 Mon Sep 17 00:00:00 2001 From: Pranshu Gaba Date: Tue, 18 Feb 2025 05:21:42 +0530 Subject: [PATCH] images: Add option for vertical alignment to images.Text Add option ``aligny`` to specify the vertical alignment of the text with respect to the ``y`` offset from the top of the image. Possible values of ``aligny`` are ``top`` (default), ``center``, and ``bottom``. The height of the block of text is measured from the top of the first line to the baseline of the last line. - ``top``: (Current behaviour) The top of the first line of the block of text is at an offset of ``y`` from the top of the image. - ``center``: The vertical center of the block of text is at an offset of ``y`` from the top of the image. - ``bottom``: The baseline of the last line of the text is at an offset of ``y`` from the top of the image. Resolves #13414 --- content/en/functions/images/Text.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/content/en/functions/images/Text.md b/content/en/functions/images/Text.md index 94cdb4e9d..8f7e730ba 100644 --- a/content/en/functions/images/Text.md +++ b/content/en/functions/images/Text.md @@ -18,6 +18,9 @@ alignx : {{< new-in 0.141.0 />}} : (`string`) The horizontal alignment of the text relative to the horizontal offset, one of `left`, `center`, or `right`. Default is `left`. +aligny +: (`string`) The vertical alignment of the text relative to the vertical offset, one of `top`, `center`, or `bottom`. Default is `top`. + color : (`string`) The font color, either a 3-digit or 6-digit hexadecimal color code. Default is `#ffffff` (white).