Tests not properly detecting font-size in SASS @while challenge
Describe the bug
With my code, elements display correctly, and devtools shows that the font-sizes for all .text-#{$x} elements is correct. However, the tests do not pass.
To Reproduce
- Go to 'https://learn.freecodecamp.org/front-end-libraries/sass/apply-a-style-until-a-condition-is-met-with-while/'
- Between the
styletags, add:
$x: 1;
@while $x <= 10 {
.text-#{$x} { font-size: 5px * $x; }
$x: $x+ 1;
}
- The test won't pass even though the text displays correctly in the right pane, and devtools confirms the elements have the appropriate styling.
Expected behavior Tests should pass.
Screenshots

Desktop (please complete the following information):
- OS: [e.g. iOS] Ubuntu 18.04 LTS
- Browser [e.g. chrome, safari] Brave
- Version [e.g. 22] 0.23.31 Also tested in Firefox 61.0
Additional context A similar issue is filed here: https://github.com/freeCodeCamp/freeCodeCamp/issues/17838
I think this is now the preferred place to post it.
Note that if this was a browser-induced minimum font-size issue, it seems like the larger font tests would work, even if the 5px test did not.
Update:
Tests pass on this challenge when the spacing is tweaked. This spacing passed for me:
$x: 1;
@while $x <= 10 {
.text-#{$x} { font-size: 5px * $x;
}
$x: $x+ 1;
}
This is also tracked in #12699 of the main repo.
uuummmm. Do I get points for enthusiasm?