Skip to main content

alpha-changing-cover

Cover content with an alpha-changing mechanism.

Example: config-methods(cover: utils.alpha-changing-cover.with(alpha: 25%))

Parameters

alpha : ratio    default: 25%

The opacity to apply to text colors when covered. Default is 25%.

fallback-hide : func    default: hide

The function to use to hide the content if it does not contain text. Default is typst's own hide. You may pass none to not hide non-text content. To hide content with a semi-transparent/color overlay, you can pass in semi-transparent-cover/cover-with-rect.with(fill: ...).

transparentize-table : bool    default: false

Whether to transparentize table content. Default is false.

it : content

The content to cover.

fallback-hide-args : args    default: (:)

The arguments to pass to the fallback hide function if the content does not contain text.

Returns: content