Last active
June 7, 2017 18:19
-
-
Save graciano/bfbc934e87a55f6343b9f382a706267d to your computer and use it in GitHub Desktop.
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
/* | |
* this really needs more work, the translates are tested only with 25px | |
*/ | |
@mixin arrow($size: 25px, $orientation: left, $color: #000, $hover-color: red) { | |
&:before, &:after { | |
display: block; | |
width: $size; | |
height: 1em; | |
border-top: 3px solid $color; | |
line-height: 1em; | |
content: ' '; | |
} | |
&:before { | |
transform: rotate(-45deg) translateX(60%) translateY(60%); | |
} | |
&:after { | |
transform: rotate(45deg) translateX(10%) translateY(-50%); | |
} | |
@if $orientation == right { | |
transform: rotate(180deg) translateY(50%) translateX(20%); | |
} | |
&:hover{ | |
&:before, &:after { | |
border-color: $hover-color; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment