Hi I\'m trying to learn SASS/SCSS and am trying to refactor my own mixin for clearfix
what I\'d like is for the mixin to be based on whether I pass the mixin a width
You could try this:
$width:auto; @mixin clearfix($width) { @if $width == 'auto' { // if width is not passed, or empty do this } @else { display: inline-block; width: $width; } }
I'm not sure of your intended result, but setting a default value should return false.