Tell us what’s happening:
Error Code: “Your mixin should have an @else statement to set the border to none.”
The @else statement is there. The border is set to none. There is a semi-colon to end the line. The brackets match up. It is spelled correctly. What am I missing?
Your code so far
<style type='text/sass'>
@mixin border-stroke($val){
@if $val == light {
border: 1px solid black;
}
@else if $val == medium {
border: 3px solid black;
}
@else if $val == heavy {
border: 6px solid black;
}
@else $val == none {
border: none;
}
}
#box {
width: 150px;
height: 150px;
background-color: red;
@include border-stroke(medium);
}
</style>
<div id="box"></div>
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0
.
Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/sass/use-if-and-else-to-add-logic-to-your-styles