Use @for to create a sass loop (What's wrong?)

Tell us what’s happening:

Your code so far


<style type='text/scss'>
@for $j from 1 through 5 {
.text-#{$j} {
  font-size: 10px * $j;
}
}


</style>

<p class="text-1">Hello</p>
<p class="text-2">Hello</p>
<p class="text-3">Hello</p>
<p class="text-4">Hello</p>
<p class="text-5">Hello</p>


Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:76.0) Gecko/20100101 Firefox/76.0.

Challenge: Use @for to Create a Sass Loop

Link to the challenge:

I can not see what I am doing wrong. Please help me. Thank you.

It should create 5 classes called .text-1 to .text-5 where each has a font-size set to 15px multiplied by the index.

are you using the right number?

Should I use the number 6?
Wait…

set to 15px

are you using the right number?

1 Like

Thank you @ieahleen, I swear I lose my brain sometimes.