Created
February 21, 2014 15:57
-
-
Save d3signerd/9136871 to your computer and use it in GitHub Desktop.
SCSS Arrow Mixins
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
/* | |
* | |
* Arrow Mixins | |
* | |
*/ | |
/* Settings */ | |
$arrow-color: $FFFFFF; | |
$arrow-up: 'up'; | |
$arrow-right: 'right'; | |
$arrow-down: 'down'; | |
$arrow-left: 'left'; | |
$arrow-width: 5px; | |
/* Mixins */ | |
@mixin arrow ( $direction: $arrow-right , $width: $arrow-width , $color: $arrow-color ) { | |
width: 0; | |
height: 0; | |
// Up | |
@if $direction == $arrow-up { | |
border-left: $width solid transparent; | |
border-right: $width solid transparent; | |
border-bottom: $width solid $color; | |
// Right | |
} @else if $direction == $arrow-right { | |
border-top: $width solid transparent; | |
border-bottom: $width solid transparent; | |
border-left: $width solid $color; | |
// Down | |
} @else if $direction == $arrow-down { | |
border-left: $width solid transparent; | |
border-right: $width solid transparent; | |
border-top: $width solid $color; | |
// Left | |
} @else if $direction == $arrow-left { | |
border-top: $width solid transparent; | |
border-bottom: $widthpx solid transparent; | |
border-right:10$width solid $color; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment