Last active
October 17, 2018 07:58
-
-
Save Yipee-ki-yay/0ac54fd0bb95b805fab9c10ded7eb2ef to your computer and use it in GitHub Desktop.
mixin arrow border
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($direction: down, $size: 5px, $color: #555) { | |
width: 0; | |
height: 0; | |
@if ($direction == left) { | |
border-top: $size solid transparent; | |
border-bottom: $size solid transparent; | |
border-right: $size solid $color; | |
} | |
@else if ($direction == right) { | |
border-top: $size solid transparent; | |
border-bottom: $size solid transparent; | |
border-left: $size solid $color; | |
} | |
@else if ($direction == down) { | |
border-left: $size solid transparent; | |
border-right: $size solid transparent; | |
border-top: $size solid $color; | |
} | |
@else { | |
border-left: $size solid transparent; | |
border-right: $size solid transparent; | |
border-bottom: $size solid $color; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment