Created
September 9, 2012 04:02
-
-
Save dustinhorton/3682509 to your computer and use it in GitHub Desktop.
Blackbelt Blog Gists - SASS Triangle Mixin
This file contains hidden or 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 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