Skip to content

Instantly share code, notes, and snippets.

@techird
Created August 8, 2014 04:57
Show Gist options
  • Save techird/2333f9421589a80809d6 to your computer and use it in GitHub Desktop.
Save techird/2333f9421589a80809d6 to your computer and use it in GitHub Desktop.
.triangle {
content: ' ';
display: block;
width: 0;
height: 0;
line-height: 0;
font-size: 0;
border-style: solid;
border-color: transparent;
}
.triangle-top(@color, @width: 10px, @height: @width) {
.triangle;
border-width: @height (@width/2);
border-top-color: @color;
}
.triangle-bottom(@color, @width: 10px, @height: @width) {
.triangle;
border-width: @height (@width/2);
border-bottom-color: @color;
}
.triangle-left(@color, @width: 10px, @height: @width) {
.triangle;
border-width: (@height/2) @width;
border-left-color: @color;
}
.triangle-right(@color, @width: 10px, @height: @width) {
.triangle;
border-width: (@height/2) @width;
border-right-color: @color;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment