Apply a Style Until a Condition is Met with @while , code should increment the counter variable

Tell us what’s happening:

For some reason i cant pass the following challenge:

Your code should increment the counter variable.

Everything else passes

Your code so far


<style type='text/sass'>
$counter : 1;
@while $counter<11{
	.text-#{$counter} { font-size : 5px*$counter }
	$counter : $counter+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/71.0.3578.98 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/

If you add spaces it should pass
From:
$counter+1
To:
$counter + 1

1 Like