Are you searching for Sass Functions List? In this example, we have shared the list functions are used to access values in a list, combine lists, and add items to lists.
The following table lists all list functions in Sass:
Sass Function | Description |
---|---|
append(list, value, [separator]) | Adds a single value to the end of the list. separator can be auto, comma, or space. auto is default. Example: |
index(list, value) | Returns the index position for the value in list. Example: |
is-bracketed(list) | Checks whether the list has square brackets. Example: |
join(list1, list2, [separator, bracketed]) | Appends list2 to the end of list1. separator can be auto, comma, or space. auto is default (will use the separator in the first list). bracketed can be auto, true, or false. auto is default. Example: |
length(list) | Returns the length of the list. Example: |
list-separator(list) | Returns the list separator used, as a string. Can be either space or comma. Example: |
nth(list, n) | Returns the nth element in the list. Example: |
set-nth(list, n, value) | Sets the nth list element to the value specified. Example: |
zip(lists) | Combines lists into a single multidimensional list. Example: |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.