Use @for to Create a Sass Loop - test failure

Tell us what’s happening:
The code is passing the first test, but not the other tests. I don’t understand why the other tests aren’t passed?

Here are other tests to pass:
Your .text-1 class should have a font-size of 10px.
Your .text-2 class should have a font-size of 20px.
Your .text-3 class should have a font-size of 30px.
Your .text-4 class should have a font-size of 40px.
Your .text-5 class should have a font-size of 50px.

Your code so far


<style type='text/sass'>
  
  @for $j from 1 through 6 {
.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_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/sass/use-for-to-create-a-sass-loop

It should pass all the tests. Trying refreshing your browser and running the tests again. Which browser are you using? You might try Chrome which seems to work best with FCC.

1 Like

I’ve refreshed using chrome and still the same result. Any ideas?

I faced similar issue in chrome.I changed browser to firefox it worked fine.

1 Like

This issue happens to other SASS challenges like the one below

https://learn.freecodecamp.org/front-end-libraries/sass/apply-a-style-until-a-condition-is-met-with-while

When i switch to firefox only they show correct results.

1 Like