0
0
SASSmarkup~5 mins

List values and operations in SASS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a list in Sass?
A list in Sass is a collection of values separated by spaces or commas. It helps group multiple values together for easy use and manipulation.
Click to reveal answer
beginner
How do you create a comma-separated list in Sass?
You create a comma-separated list by writing values separated by commas, like: $colors: red, green, blue;
Click to reveal answer
intermediate
What does the nth() function do in Sass lists?
The nth() function returns the value at a specific position in a list. For example, nth($list, 2) gives the second item.
Click to reveal answer
intermediate
How can you add a value to the end of a Sass list?
Use the append() function. For example, append($list, new-value) adds new-value to the end of $list. By default, it appends with a space separator unless a third argument specifies otherwise.
Click to reveal answer
advanced
What is the difference between space-separated and comma-separated lists in Sass?
Space-separated lists use spaces between values and behave like multiple arguments. Comma-separated lists use commas and keep values grouped distinctly. Some functions treat them differently.
Click to reveal answer
How do you access the third item in a Sass list named $my-list?
Aget($my-list, 3)
Bnth($my-list, 3)
C$my-list[3]
Ditem($my-list, 3)
Which function adds a value to the end of a Sass list?
Aappend()
Binsert()
Cadd()
Dpush()
What separator does this list use? $list: 10px 20px 30px;
ASpace-separated
BSemicolon-separated
CComma-separated
DColon-separated
If you want to keep values grouped distinctly, which list separator should you use?
ASpace
BSemicolon
CComma
DSlash
What will length(10px, 20px, 30px) return?
A0
B1
C3
DError
Explain how to create and access values in a Sass list.
Think about how you group items in a shopping list and how you pick one item by position.
You got /3 concepts.
    Describe how to add a new value to an existing Sass list and why list separators matter.
    Imagine adding a new ingredient to a recipe list and how you separate ingredients.
    You got /3 concepts.