I have one mixin for width and height. Here is my code.
<div id="ele1">test</div>
<div id="ele2">test2</div>
<div id="ele3">test2</div>
@mixin size($width, $height: $width) {
width: $width;
height: $height;
}
#ele1 {
@include size(80px);
}
#ele2 {
@include size(80px, 180px);
}
#ele3 {
@include size(80px, auto);
}
.element{
background:blue;
margin:10px;
color:#fff;
float:left;
padding:20px;
}
Reference : SASS Conditional Rendering