Apply a Style Until a Condition is Met with @while saas

Tell us what’s happening:
Why this challenge is not accepting my code even though output is right…

Your code so far


<style type='text/sass'>
  $index:1;
  @while $index<=10{
  .text-#{$index}{font-size:5px*$index;}
  $index:$index+1;
  }
  
 
 
</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>
<p class="text-6">Hello</p>
<p class="text-7">Hello</p>
<p class="text-8">Hello</p>
<p class="text-9">Hello</p>
<p class="text-10">Hello</p>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) 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/apply-a-style-until-a-condition-is-met-with-while/

This is a known bug. See https://github.com/freeCodeCamp/freeCodeCamp/issues/17479

1 Like