- /// 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.
- ///
- /// # Relative to the page
- /// A common use case is setting the width or height of a layout element (e.g.,
- /// [block], [rect], etc.) as a certain percentage of the width of the page.
- /// Here, the rectangle's width is set to `{25%}`, so it takes up one fourth of
- /// the page's _inner_ width (the width minus margins).
- ///
- /// ```example
- /// #rect(width: 25%)
- /// ```
- ///
- /// Bare lengths or ratios are always valid where relative lengths are expected,
- /// but the two can also be freely mixed:
- /// ```example
- /// #rect(width: 25% + 1cm)
This file has been truncated. show original