Documentation

relative

A length in relation to some known length.

This type is a combination of a length with a ratio. It results from addition and subtraction of a length and a ratio. Wherever a relative length is expected, you can also use a bare length or ratio.

Example

#rect(width: 100% - 50pt)

#(100% - 50pt).length \
#(100% - 50pt).ratio
Preview

A relative length has the following fields: