Skip to main content

to-string ()

Returns a string representing the specified list and its items.

Parameters

$list
The list from which to generate a string.
Type
List | Map | ArgList

Return Value

String
A string representing the given list.

Example

@use '@sass-fairy/list';

@debug list.to-string([10px 20px 'a']);
// 10px 20px a

@debug list.to-string([10px, 20px, 'a']);
// 10px, 20px, a

@debug list.to-string([10px 20px (a: 1, 2: b)])
// '10px 20px {a: 1; 2: b}'