跳到主要内容

lazy-h

Lazy fractional horizontal space, the horizontal counterpart of lazy-v. Used with lazy-layout(direction: ltr) to push content to the right edge of a block while keeping sibling blocks at equal width without filling the entire page.

Has no visual effect without a matching lazy-layout. If a row contains multiple lazy-h markers (stacked blocks), only the last one is activated.

Example:

#lazy-layout(
direction: ltr,
stack(
dir: ltr,
block(height: 100%)[
Left label. #lazy-h(1fr) Right label.
],
block(height: 100%)[
A longer left label. #lazy-h(1fr) Right label.
],
),
)
Parameters

amount : fraction

The fractional amount of space (e.g. 1fr).

weak : bool    default: false

Whether the space is weak. Default is false.

Returns: content