Use @each to Map Over Items in a List: bug

Use @each to Map Over Items in a List: bug
0.0 0

#1

Tell us what’s happening:
There seems to be a bug in this challenge! I can’t get it to pass the tests.
Any idea how to work around it?

Your code so far


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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/sass/use-each-to-map-over-items-in-a-list


#2

You need parentheses around this to make it an array


#3

Thanks! But actually it worked as is after trying 5-6 times in a different browser.
And the example says:

@each $color in blue, red, green {
  .#{$color}-text {color: $color;}
}

#4

Parentheses are used on a map and not a list.