Skip to content

Instantly share code, notes, and snippets.

@dustinhorton
Created September 9, 2012 04:02
Show Gist options
  • Save dustinhorton/3682509 to your computer and use it in GitHub Desktop.
Save dustinhorton/3682509 to your computer and use it in GitHub Desktop.
Blackbelt Blog Gists - SASS Triangle Mixin
@mixin triangle($dir, $size, $color) {
border: $size transparent solid;
@if ($dir == "top" or $dir == "up") {
border-bottom-color: $color;
}
@else if ($dir == "right" or $dir == "after") {
border-left-color: $color;
}
@else if ($dir == "bottom" or $dir == "down") {
border-top-color: $color;
}
@else if ($dir == "left" or $dir == "before") {
border-right-color: $color;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment