From the course: Sass Essential Training
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Using lists - Sass Tutorial
From the course: Sass Essential Training
Using lists
- [Tutor] You can use lists to create an array type object that helps you go through a group of items easily. Arrays are one of the more flexible data types in SaaS. You can create them by using either comas or spaces. You can also use optional brackets or parentheses. If you're passing along an element that already has spaces, then you'll need to add quotes to the item or it will think that it's a new element. And now this is a little bit weird but arrays are one index. So the first element is element number one, this is different than in most other programming languages, including JavaScript. So make sure that you watch out for that. You can even include negative indexes. Now this sounds weird, but it can be useful to get the last element in an array.. List values are also immutable, which means that their contents never change. When we attempt to change lists, we actually create a new copy in order to avoid potential…
Contents
-
-
-
-
-
(Locked)
Interpolation2m 22s
-
(Locked)
Placeholder selectors1m 29s
-
(Locked)
Comments1m 52s
-
(Locked)
Using lists9m 21s
-
(Locked)
Each2m 47s
-
(Locked)
For2m 1s
-
(Locked)
Maps5m 1s
-
(Locked)
Operators and conditionals5m 57s
-
(Locked)
Color functions4m 27s
-
(Locked)
Challenge: Badges1m 36s
-
(Locked)
Solution: Badges8m 43s
-
(Locked)
-