join

join($list1, $list2, $separator:auto)

Joins together two lists into one.

Unless $separator is passed, if one list is comma-separated and one is space-separated, the first parameter’s separator is used for the resulting list. If both lists have fewer than two items, spaces are used for the resulting list.

Like all list functions, join() returns a new list rather than modifying its arguments in place.

Examples:

join(10px 20px, 30px 40px) => 10px 20px 30px 40px
join((blue, red), (#abc, #def)) => blue, red, #abc, #def
join(10px, 20px) => 10px 20px
join(10px, 20px, comma) => 10px, 20px
join((blue, red), (#abc, #def), space) => blue red #abc #def

Parameters:

  • $list1 (Base)
  • $list2 (Base)
  • $separator (String) — The list separator to use. If this is comma or space, that separator will be used. If this is auto (the default), the separator is determined as explained above.

Returns:

  • (List)
doc_Sass
2016-11-11 13:09:12
Comments
Leave a Comment

Please login to continue.