Position mixin
SCSS
@mixin pos-a($top,$right,$bottom,$left,$width,$height,$zindex){ position: absolute; @if($top != ''){ top: rem($top) } @if($left != ''){ left: rem($left) } @if($bottom != ''){ bottom: rem($bottom) } @if($right != ''){ right: rem($right) } @if($width != ''){ width: rem($width) } @else { width: auto } @if($height != ''){ height: rem($height) } @if($zindex != ''){ z-index: $zindex; } } @mixin pos-f($top,$right,$bottom,$left,$width,$height,$zindex){ position: fixed; @if($top != ''){ top: rem($top) } @if($left != ''){ left: rem($left) } @if($bottom != ''){ bottom: rem($bottom) } @if($right != ''){ right: rem($right) } @if($width != ''){ width: rem($width) } @else { width: auto } @if($height != ''){ height: rem($height) } @if($zindex != ''){ z-index: $zindex; } } // example div { @include pos-a(0,0,'','',100px,100px,5) }