Here is the SCSS code I currently have:
@if $position == bottom {
&:after {
height: $triangle-width;
width: $triangle-width;
content:"";
position:absolute;
margin-top: -$triangle-width/2 -$stroke-width;
}
}
@if $position == top {
&:before {
height: $triangle-width;
width: $triangle-width;
content:"";
position:absolute;
margin-bottom: -$triangle-width/2 -$stroke-width;
}
}
There is some duplicated code here that I'd like to streamline. I attempted to create a separate class, but it didn't work as expected. Any suggestions on how to optimize this? I thought about creating a mixin within a mixin, but that might be too complex. What are your thoughts?