Skip to content

Instantly share code, notes, and snippets.

@wiseoldman
Created April 11, 2018 09:46
Show Gist options
  • Save wiseoldman/1a1f2654310f6f3f21f982f5dc727672 to your computer and use it in GitHub Desktop.
Save wiseoldman/1a1f2654310f6f3f21f982f5dc727672 to your computer and use it in GitHub Desktop.
[Line arrow mixin] Line arrow mixin for scss #arrow
@mixin arrow($line-width:4px, $size:4px, $color:#000, $direction:down) {
border: solid $color;
border-width: 0 $line-width $line-width 0;
display: inline-block;
padding: $size;
margin-top: -$size;
@if $direction == down {
transform: rotate(45deg);
} @else if $direction == up {
transform: rotate(-135deg);
} @else if $direction == left {
transform: rotate(135deg);
} @else if $direction == right {
transform: rotate(-45deg);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment