raha
June 1, 2018, 10:08pm
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 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36
.
Link to the challenge:
Learn to code. Build projects. Earn certifications.Since 2015, 40,000 graduates have gotten jobs at tech companies including Google, Apple, Amazon, and Microsoft.
You have an extra }
before the div style:
}
div {
height: 200px;
width: 200px;
}
</style>
1 Like
raha
June 1, 2018, 11:07pm
3
oh thanks ! but still i didn’t pass this challenge.
If you post your updated code, then I or someone else can try and help.
raha
June 1, 2018, 11:18pm
5
<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>
When I copy and paste your code it works and passes all the tests. You could try resetting the code and pasting you code solution in again?
I can’t see anything wrong with your code and the display of colors on the right is correct. There might be a hidden character/error somewhere. The only idea I have left is if you click reset all code and/or do a hard reset of your browser:
Hopefully, when you retype the code in, it will then pass the tests.
I really hope this works for you
Elthask
October 23, 2018, 5:14pm
11
Tell us what’s happening:
So also getting a bug here… can someone check this out please?
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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/sass/use-each-to-map-over-items-in-a-list