Skip to main content

prepend ()

Returns a list with the specified value added to the beginning.

Parameters

$list
The list to which the value is to be prepended.
Type
List
$value
The value which is to be prepended.
Type
*
$separator
The type of separator to be used by the copied list.
Type
space | comma | slash | auto
Default
auto

Return Value

List
A list with the given value added to the beginning.

Example

@use '@sass-fairy/list';

@debug list.prepend(10px 20px, 30px);
// 30px 10px 20px

@debug list.prepend((blue, red), green);
// green, blue, red

@debug list.prepend((blue, red), green, space);
// green blue red