Sass: Apply a Style Until a Condition is Met with @while - Error

Tell us what’s happening:
Hello! Thank you for your time helping me.
Test result is… Your .text-1 class should have a font-size of 5px.
Why does only text-1 have the problem among 10 id tags?
I have no idea what error I have in my code.

Your code so far

<style type='text/sass'>
  $x: 1;
  @while $x < 11 {
  .text-#{$x} { font-size: 5px * $x;}
  $x: $x + 1;

<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 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36.

Link to the challenge:

What browser are you using? Your solution passes the tests when I run them.

I am using Chrome… How about you? :confused:

It’s working for me with the most recent version of Chrome. Try resetting the challenge and putting your solution in again.

1 Like

Thank you! It really worked with updated version of Chrome.