Created
April 11, 2018 09:46
-
-
Save wiseoldman/1a1f2654310f6f3f21f982f5dc727672 to your computer and use it in GitHub Desktop.
[Line arrow mixin] Line arrow mixin for scss #arrow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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