How to use mapping

How to use mapping
0

#1

Tell us what’s happening:

Your code so far


<style type='text/sass'>
  $colors: (color1: blue , color2: black , color3: red);

  @each $key, $color in $colors {
    .#{$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 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 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

Your code works on my browser.

Try using a different browser/updating to the current version/clean your caches and cookies.


#3

so it passes just fine huh? Thank you sir ill reload in fire fox