From the course: Sass Essential Training

Unlock the full course today

Join today to access over 24,100 courses taught by industry experts.

For

For

“

- [Instructor] The for at-rule gives you a way to iterate through a series of numbers, which can be pretty useful. Now this can either count up or down through a series of numbers and the format looks like this. You include the for at-rule and then you specify a variable and then you either use the to or through keyword with an expression. Now, you use to if you want it not to include the last number. So if you say like one, two, three, it would just give you one and two but not three and you use the through keyword when you want it to go all the way to the end of the number so include that last number. And then you can use something that evaluates to one expression and then a series of commands in the curly braces. Here's an example of how you can generate all of these sizes for your headlines using the for at-rule. So let's take a look at how this would actually work. So here you can see that I have that same piece of…

Contents