I'd like to know if there is a way to include a mixin (compass or my own) by a value of a specific variable.
Currently I have the following mixin (which works)
@mixin aligned-top-bottom-border($size, $side){
@if $side == "left"{
@include border-top-left-radius($size);
@include border-bottom-left-radius($size);
}
@else{
@include border-top-right-radius($size);
@include border-bottom-right-radius($size);
}
}
I'd like to turn it to something like the code below (or any other alternative that is shorter and more readable)
@mixin aligned-top-bottom-border($size, $side){
@include border-top-#{side}left-radius($size);
@include border-bottom-#{side}-radius($size);
}
I'm using Sass 3.4.5 (Selective Steve)