Syntax for if/else condition in SCSS mixin
You can assign default parameter values inline when you first create the mixin: @mixin clearfix($width: ‘auto’) { @if $width == ‘auto’ { // if width is not passed, or empty do this } @else { display: inline-block; width: $width; } }