Creates a new Sass list.
The initial values of the list elements are undefined. These elements must be set using setValue before accessing them or passing the list back to Sass.
The number of (initially undefined) elements in the list.
If true
, the list is comma-separated; otherwise, it's space-separated. Defaults to true
.
Returns the number of elements in the list.
Returns true
if this list is comma-separated and false
otherwise.
Returns the element at index
, or undefined
if that value hasn't yet been set.
A (0-based) index into this list.
Sets whether the list is comma-separated.
true
to make the list comma-separated, false
otherwise.
Sets the element at index
to value
.
A (0-based) index into this list.
© 2006–2022 the Sass team, and numerous contributors
Licensed under the MIT License.
https://sass-lang.com/documentation/js-api/classes/types.List
Sass's list type.
⚠️ Heads up!
This list type’s methods use 0-based indexing, even though within Sass lists use 1-based indexing. These methods also don’t support using negative numbers to index backwards from the end of the list.