Home > @jsamr/counter-style > CounterStyleRenderer > withRange
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;
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: