curriculum icon indicating copy to clipboard operation
curriculum copied to clipboard

Tests not properly detecting font-size in SASS @while challenge

Open CharmedSatyr opened this issue 7 years ago • 2 comments

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

  1. Go to 'https://learn.freecodecamp.org/front-end-libraries/sass/apply-a-style-until-a-condition-is-met-with-while/'
  2. Between the style tags, add:
  $x: 1;
  @while $x <= 10 {
    .text-#{$x} { font-size: 5px * $x; }
    $x: $x+ 1;
  }
  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 screenshot from 2018-07-08 05-55-24

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;
  }

CharmedSatyr avatar Jul 08 '18 11:07 CharmedSatyr

This is also tracked in #12699 of the main repo.

lynxlynxlynx avatar Jul 14 '18 14:07 lynxlynxlynx

uuummmm. Do I get points for enthusiasm?

panik-stricken avatar Jul 25 '18 23:07 panik-stricken