Not Working Use @each to Map Over Items in a List

Not Working Use @each to Map Over Items in a List
0

#1

Tell us what’s happening:

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 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 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

the test is very sensitive to spaces so rewrite it to look like this:

  @each $color in blue, black, red{

#3

still its not working


#4

Are you using Chrome? If not, try it.


#5

I am using chrome .Does I have to use another Browser


#6

Just wanted to make sure. Can you please repost your latest code attempt?

When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.