If I use the following code in this assignment:
.info{
width: 200px;
border: 1px solid black;
margin: 0 auto;
&-important{
@extend .info;
background-color: magenta;
}
}
the output will appear correct, but the test fails. Is there any reason why this should fail? Use of the ampersand isn’t illegal sass at all and can be very useful for modifier classes such as this one. In order to finish the assignment I had to write the info-important class separately which feels redundant:
.info{
width: 200px;
border: 1px solid black;
margin: 0 auto;
}
.info-important{
@extend .info;
background-color: magenta;
}