Apply a Style Until a Condition is Met with @while - Not work in Chrome

Tell us what’s happening:
I can’t pass following test -
Your .text-1 class should have a font-size of 5px.

I can’t find any error in my code, I think there is a bug?

Your code so far


<style type='text/sass'>
  $x: 1;
  @while $x < 11 {
    .text-#{$x} { font-size: 5px * $x;}
    $x: $x + 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 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 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

Try a couple of things. Make sure your Zoom is a 100%. Next go to chrome://settings/fonts and make sure you set minimum font size to the lowest setting.

image

1 Like

Thanks for quick response, @RandellDawson, I never thought that cloud be a solution. I check out my chrome’s setting, it seems it already have the same settings as you suggested. And I finally fixed it by trying with Firefox …