From a8a5b9a4a311fd8fe6e469ab0aad646edc00950d Mon Sep 17 00:00:00 2001 From: DelazJ Date: Tue, 17 Dec 2024 18:49:51 +0100 Subject: [PATCH] Some more CSS properties for HTML-enabled labels --- .../style_library/label_settings.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/user_manual/style_library/label_settings.rst b/docs/user_manual/style_library/label_settings.rst index 2afc79a495d..57318de08b4 100644 --- a/docs/user_manual/style_library/label_settings.rst +++ b/docs/user_manual/style_library/label_settings.rst @@ -209,6 +209,25 @@ we invite you to explore and test in your labels * Text decorations such as underline, overline and line-through (``text-decoration``) * Text alignment (``vertical-align``, ``text-align``). Horizontal alignment can not be used for curved labels. +* Line height, in ``points`` or ``percent`` unit, e.g. "line-height: 40pt" or "line-height: 40%" +* Background properties such as ``background-color`` and ``background-image``. + They are supported for block type items (e.g. ``div``) or inline items (e.g. ``span``). + For images, the CSS should be formatted as ``background-image: url(xx)`` + and supports local file paths, HTTP links, or base64 embedded content. + + .. attention:: Backgrounds are not supported for curved text and are always rendered + above any background shape for the label, and below drop shadows/buffers properties. + +* Margin properties, available for block type items only, such as ``div``, ``p``, ``h1``,... + They can be specified in either the longhand or shorthand way, in ``points`` unit only. + Negative values can be set for the bottom margin. + + .. code-block:: html + +
+

QGIS still rocks...

+

Thanks to you!!

+
CSS properties can be set on HTML tags with the ``style`` attribute. The HTML tag ``span`` does not apply any formatting to text by itself