Skip to main content

fit-to-width

Fit content to specified width.

Example: #utils.fit-to-width(100%)[BIG]

Parameters

width : length | fraction | relative    default: 1fr

The width to fit the content to. For example, width: 50% will fit the content to half of the slide width. If given as a fraction, it will be based on the available width after everything else is evaluated, similar to how fractional lengths behave for table column widths. Default is 1fr which means to fit the content to the full available rest width.

grow : bool    default: true

Indicates whether the content should be scaled up if it is smaller than the available width. Default is true.

shrink : bool    default: true

Indicates whether the content should be scaled down if it is larger than the available width. Default is true.

body : content

The content to fit. If two positional arguments are given, this will be width instead.

..args : arguments

For convenience and compatibility with older versions, passing in width as a positional argument is still supported. If two positional arguments are given, the first one is the width and the second one is the body.

Returns: content