math.range()
// Sass.
@use 'sass:list';
// Functions.
@use '../meta/meta.of-type.function';
// Modules.
@use 'range';
// The `math.range()` function.
@function range($from, $to, $step: 1, $except: null, $separator: auto) {
@return if(
meta.of-type(number, $from, $to, $step),
if(
$from < $to,
range.up($from, $to, $step, $except, $separator),
range.down($from, $to, $step, $except, $separator)
),
null
);
}https://github.com/angular-package/sass/blob/main/math/_math.range.function.scss
Parameters
$from
$from$to
$to$step: 1
$step: 1$except: null
$except: null $separator: auto
$separator: autoReturn
Examples
Last updated