Sass: Apply a Style Until a Condition is Met with @while (yashant)

I cannot figure out what is wrong with this code.

$x: 1; @while $x < 11 { .text-#{$x} { font-size: 5px * $x;} $x: $x + 1; }

Your solution works for me in the most recent version of Chrome.

Are you by any chance using Edge, IE, or Safari as your browser? Free Code Camp has been updated to use newer technologies. It makes the application much faster and it means that we can go much longer without having to do a huge migration like the recent one. However, Edge, Internet Explorer, and Safari are very bad about choosing not to adhere to standards and support new functionality in JS and CSS. Right now, that means that these browsers exhibit lots of unexpected behavior. If you become a web developer you will come to hate these browsers with every fiber of your being.

Hi @ArielLeslie, it seems there is an issue raised for Sass challenge, it works for some and for the rest it doesn’t,

The person who opened that issue is not using the most recent version of Chrome. They are using Chrome 66. If you haven’t yet, you should update your Chrome to 68.

Nope, it works for me, mine is updated both firefox and chrome, ohh then it requires latest version, Fine.!

I am using the version 68 of Chrome. I tried edge and IE as well and none of them work for me.

Both @linchpin1 and @Ore00 I’m having the same problem and our Chrome browsers are up to date (version 68). Please advise:

$x: 1;
@while $x < 11 {
.text-#{$x} { font-size: 5px * $x;}
$x: $x + 1;
}

1 Like

Is there a solution to this issue?

Your solution works for me in Chrome 68. Try resetting the challenge and pasting your code in again. Then when you run the tests they should pass.

I am having similar issues with this. Tried multiple browsers, all are up to date.

doesn’t work on Chrome Version 70.0.3538.102 (Official Build) (64-bit), win 10

It only fails test-1, all others pass. Upon inspection using Chrome dev tools you can see that .text-1 is indeed getting the proper font-size applied to it.