From 5329b7d21137d87821d1f3917c21ff5202a9a742 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 9 Aug 2024 12:16:06 -0400 Subject: [PATCH] docs: More details for the node format Add some more details. --- docs/reference/gtk/node-format.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/reference/gtk/node-format.md b/docs/reference/gtk/node-format.md index 894c36f3e6..66f18d681a 100644 --- a/docs/reference/gtk/node-format.md +++ b/docs/reference/gtk/node-format.md @@ -6,7 +6,7 @@ The format is a text format that follows the [CSS syntax rules](https://drafts.c The grammar of a node text representation using [the CSS value definition syntax](https://drafts.csswg.org/css-values-3/#value-defs) looks like this: - document: <@-rule>** + document: <@-rule>* @-rule: @cicp "name" { * } node: container [ "name" ] { } | [ "name" ] { * } | "name" property: : | ; @@ -70,6 +70,16 @@ The traditional syntax for sRGB colors still works as well: rgba(, , , , ) +# Rectangles + +Rectangles can be specified just as four integers for x, y, width and height: + + rect: + +Rounded rectangles use a CSS-like syntax: + + rounded-rect: [ "/" {1,4} [ "/" {1,4} ] ] + # Nodes ### container @@ -396,9 +406,9 @@ Possible values for the line-join property are: | font | `` ``? | "Cantarell 15px" | always | | glyphs | `` | "Hello" | always | | offset | `` | 0 0 | non-default | -| hint-style | `` | slight | non-default | +| hint-style | `` | slight | non-default | | antialias | `` | gray | non-default | -| hint-metrics | `` | off | non-default | +| hint-metrics | `` | off | non-default | Creates a node like `gsk_text_node_new()` with the given properties.