Tell us what’s happening:
I dont why it is not working. Is the sass course buggy or am I doing something wrong. Please can some one help me.
Your code so far
<style type='text/sass'>
$colors: (color1: blue, color2: black, color3: red);
@each $key, $color in $colors {
.#{$color}-text {color: $color; }
}
div {
height: 200px;
width: 200px;
background-color: $colors;
.blue-bg {
background-color: $color1;
}
.black-bg {
background-color: $color2;
}
.red-bg {
background-color: $color3;
}
</style>
<div class="blue-bg">blue</div>
<div class="black-bg">black</div>
<div class="red-bg">red</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.81 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/sass/use-each-to-map-over-items-in-a-list