Use @each to Map Over Items in a List
https://beta.freecodecamp.org/en/challenges/sass/use-each-to-map-over-items-in-a-list
My code clearly works and provide the right result in the preview section but for some reason I don't
understand I don't pass the challenge.
<style type='text/sass'>
@each $color in blue, black, red {
.#{$color}-bg {background-color: $color}
}
div {
height: 200px;
width: 200px;
}
</style>
<div class="blue-bg"></div>
<div class="black-bg"></div>
<div class="red-bg"></div>
Looking in the source it appears the test is missing the .
required for class selectors
See below the assert is using blue-bg
and should be .blue-bg
"assert($('blue-bg').css('background-color') == 'rgb(0, 0, 255)', 'message: Your .blue-bg
class should have a background-color
of blue.');",
this is lines 318-320 of
freeCodeCamp/seed/challenges/03-front-end-libraries/sass.json
Do you know if anybody is going to fix this issue?
@sjames1958gm Nice catch there! Are you interested in fixing the tests?
Here is the Contributing Guide that you should refer to, and the Contributors chat room if you need help.
Most helpful comment
Looking in the source it appears the test is missing the
.
required for class selectorsSee below the assert is using
blue-bg
and should be.blue-bg
"assert($('blue-bg').css('background-color') == 'rgb(0, 0, 255)', 'message: Your
.blue-bg
class should have abackground-color
of blue.');",this is lines 318-320 of
freeCodeCamp/seed/challenges/03-front-end-libraries/sass.json