Tell us what’s happening:
I am not able to complete the following test when I run the code: “Your mixin should have an @if statement to check if $val is light, and to set the border to 1px solid black.” Can anyone help me understand why the if statement isn’t working? Thanks.
Your code so far
<style type='text/sass'>
@mixin border-stroke($val) {
@if $val == light {
border: lpx solid black;
}
@else if $val == medium {
border: 3px solid black;
}
@else if $val == heavy {
border: 6px solid black;
}
@else {
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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/sass/use-if-and-else-to-add-logic-to-your-styles