Use @each to Map Over Items in a List.Help

Use @each to Map Over Items in a List.Help
0

#1

Tell us what’s happening:
Where is my wrong?

Your code so far


<style type='text/sass'>
  @each $color in blue, black, red {
    .#{$color}-bg {background-color: $color;}
  }
  @each $color in blue, black, red {
  .#{$color}-bg {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/68.0.3440.106 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

Hey @Klaudia sorry there has been some issues with sass tests, you may have to try out different browsers, firefox or chrome, chrome would be better and you may have to clear the cache

You don’t need this, background-color is enough, you can check it in your developer tools, that your code is correct

I tried your code in chrome by excluding the above said part, it passed.


#3

I delete that code but again is wrong.


#4

Yea that’s why it has bug, i tried chrome it passed once but second time it failed, and again i tried it passed, don’t worry your code is right. You can move onto your next challenge, Sass has some issues


#5

Ok thank you for help