Functions sass

Estimated reading time: 1 minute

List_function

Lists in Sass are immutable; all list functions return a new list rather than updating the existing list in-place.

All list functions work for maps as well, treating them as lists of pairs.

length($list) : Returns the length of a list.

nth($list, $n) : Returns a specific item in a list.

set-nth($list, $n, $value) : Replaces the nth item in a list.

join($list1, $list2, [$separator, $bracketed]) : Joins together two lists into one.

append($list1, $val, [$separator]) : Appends a single value onto the end of a list.

zip($lists...) : Combines several lists into a single multidimensional list.

index($list, $value) : Returns the position of a value within a list.

list-separator($list) : Returns the separator of a list.

is-bracketed($list) : Returns whether a list has square brackets.

Awesome Function:

css, sass, scss, ui, ux