Tell us what’s happening:
Trying to figure this one out of my own, but not sure what I’m doing wrong. My code looks like this because I looked at the example, but it came out wrong. What is it that I’m doing wrong with this code?
Your code so far
<style type='text/sass'>
$x: 1 through 10;
@while $x < 10 {
.col-#{$x} {font-size: 5px}
$x: $x*5;
}
</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; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36 Avast/73.0.1258.87
.
Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/sass/apply-a-style-until-a-condition-is-met-with-while/