<style type='text/sass'>
$x: 1;
@while $x < 11{
.text-#{$x} {font-size: $x * 5px;}
$x: $x + 1;
}
</style>
In the preview this code changes the font-size of every element but i still can’t pass the challenge.
I also tried
font-size: #{5 * $x}px;
But still can’t pass the challenge.
sorinr
July 18, 2018, 1:53pm
2
seinfeld70:
{font-size: $x * 5px;}
try 5px * $x
and should work. same result but fcc test units check for a certain syntax
sorinr
July 18, 2018, 2:48pm
4
The code its ok both ways and you should pass the challenge. This both versions are working:
$x: 1;
@while $x < 11{
.text-#{$x} {font-size: $x * 5px;}
$x: $x + 1;
}
or
$x: 1;
@while $x < 11{
.text-#{$x} {font-size: 5px * $x;}
$x: $x + 1;
}
if not, on the right browser rendering part, right click and choose reload and then run the tests again.