Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 1.19 KB

counter-style.counterstylerenderer.withrange.md

File metadata and controls

28 lines (17 loc) · 1.19 KB

Home > @jsamr/counter-style > CounterStyleRenderer > withRange

CounterStyleRenderer.withRange() method

Create a new renderer with a constrained range. When the index is out of bounds, the counter representation is rendered with the provided fallback, or the default fallback if none was provided.

See CSS Counter Styles Level 3, Limiting the counter scope: the range descriptor.

Signature:

withRange(min: number, max: number, fallback?: FallbackRenderer): CounterStyleRenderer;

Parameters

Parameter Type Description
min number Minimum value (inclusive)
max number Maximum value (inclusive)
fallback FallbackRenderer A fallback renderer to apply when the index is out of bounds.

Returns:

CounterStyleRenderer