Skip to Content
Pragmatic Guide to Sass 3
book

Pragmatic Guide to Sass 3

by Hampton Lintorn Catlin, Michael Lintorn Catlin
July 2016
Intermediate to advanced
130 pages
2h 11m
English
Pragmatic Bookshelf
Content preview from Pragmatic Guide to Sass 3
23Manipulating Lists

As well as looping through lists, you can manipulate them by adding new values or joining multiple lists together. Sass provides two functions that can help you with this: join($list1, $list2, [$separator]) and append($list1, $val, [$separator]). Their names are pretty self-explanatory!

join() lets you join together two lists. It simply takes the two lists you pass in, as seen in the example. In that situation, you want to keep the two lists of colors separate for some purposes, but need them to be one large list for others. So, you use join() to merge the two!

append() adds a new item to an existing list. This can help in situations where you need two lists that only have one item that is different. These functions ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Jump Start Sass

Jump Start Sass

Hugo Giraudel, Miriam Suzanne
What Employees Want Most in Uncertain Times

What Employees Want Most in Uncertain Times

Kristine W. Powers, Jessica B.B. Diaz
Mastering Sass

Mastering Sass

Luke Watts

Publisher Resources

ISBN: 9781680502060Errata Page