Need help to pass SASS challenge: Use @each to Map Over Items in a List

Cannot pass the challenge.
Have tried Chrome and Safari.
Doesn’t work.

How can I pass this challenge?

  **Your code so far**

<style type='text/sass'>

$colors: (color1: blue, color2: black, three: red);

@each $value, $color in $colors {
.#{$color}-bg { background-color: $color; }

div {
  height: 200px;
  width: 200px;

<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 11_2_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36.

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

Link to the challenge:


Need to change ‘sass’ in the first line to ‘scss’.

your code passes for me if I copy only the part to add
If I copy all your code it doesn’t pass

maybe reset your code and try again

1 Like

found it, you have chanced this

1 Like

Thank you very much, it works for me!