Measure
Documentation for the `measure` function.
Measures the layouted size of content.
The measure function lets you determine the layouted size of content. By default an infinite space is assumed, so the measured dimensions may not necessarily match the final dimensions of the content. If you want to measure in the current layout dimensions, you can combine measure and layout.
Example
The same content can have a different size depending on the context that it is placed into. In the example below, the #content is of course bigger when we increase the font size.
Loading compiler...
For this reason, you can only measure when context is available.
Loading compiler...
The measure function returns a dictionary with the entries width and height, both of type length.
#measure(
width: auto | length,
height: auto | length,
content
) -> dictionaryParameters
Prop
Type