Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Make some pretty triangles.
@mixin triangle($size, $color, $direction) {
width: 0;
height: 0;
@if $direction == 'up' {
border-left: $size solid transparent;
border-right: $size solid transparent;
border-bottom: $size solid $color;
} @elseif $direction == 'down' {
border-left: $size solid transparent;
border-right: $size solid transparent;
border-top: $size solid $color;
} @elseif $direction == 'left' {
border-top: $size solid transparent;
border-bottom: $size solid transparent;
border-right:$size solid $color;
} @elseif $direction == 'right' {
border-top: $size solid transparent;
border-bottom: $size solid transparent;
border-left: $size solid $color;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.