Sass variables are not being read in code

I had a look here before I made my post, and my code is the exact same.

Doing @if $var {} will always run it no matter the value, and @if $var == true {} will never run it.