Debian Codegraph @

sass-spec/spec/libsass/bourbon/lib/addons/_triangle.scss

raw
1 @mixin triangle ($size, $color, $direction) {
2 height: 0;
3 width: 0;
4
5 @if ($direction == up) or ($direction == down) or ($direction == right) or ($direction == left) {
6 border-color: transparent;
7 border-style: solid;
8 border-width: $size / 2;
9
10 @if $direction == up {
11 border-bottom-color: $color;
12
13 } @else if $direction == right {
14 border-left-color: $color;
15
16 } @else if $direction == down {
17 border-top-color: $color;
18
19 } @else if $direction == left {
20 border-right-color: $color;
21 }
22 }
23
24 @else if ($direction == up-right) or ($direction == up-left) {
25 border-top: $size solid $color;
26
27 @if $direction == up-right {
28 border-left: $size solid transparent;
29
30 } @else if $direction == up-left {
31 border-right: $size solid transparent;
32 }
33 }
34
35 @else if ($direction == down-right) or ($direction == down-left) {
36 border-bottom: $size solid $color;
37
38 @if $direction == down-right {
39 border-left: $size solid transparent;
40
41 } @else if $direction == down-left {
42 border-right: $size solid transparent;
43 }
44 }
45 }