Use @if and @else to Add Logic To Your Styles array buffer allocation failed

Tell us what’s happening:
I am getting an error as Array Buffer allocation failed. I think its out of the topic. If anyone knows the solution please help.

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 {
      border:none
    }
  }
  
  #box {
    width: 150px;
    height: 150px;
    background-color: red;
    }
    div{
    @include border-stroke(medium);
  }  
</style>

<div id="box"></div>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36.