-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtriangle.scss
More file actions
38 lines (38 loc) · 1.01 KB
/
triangle.scss
File metadata and controls
38 lines (38 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
@mixin fz-triangle($direction, $width, $height, $color) {
width: 0;
height: 0;
border-style: solid;
border-color: transparent;
@if $direction == "north" {
border-width: 0 $width / 2 $height $width / 2;
border-bottom-color: $color;
}
@if $direction == "north-east" {
border-width: 0 $width $height 0;
border-right-color: $color;
}
@if $direction == "east" {
border-width: $height / 2 0 $height / 2 $width;
border-left-color: $color;
}
@if $direction == "south-east" {
border-width: 0 0 $height $width;
border-bottom-color: $color;
}
@if $direction == "south" {
border-width: $height $width / 2 0 $width / 2;
border-top-color: $color;
}
@if $direction == "south-west" {
border-width: $height 0 0 $width;
border-left-color: $color;
}
@if $direction == "west" {
border-width: $height / 2 $width $height / 2 0;
border-right-color: $color;
}
@if $direction == "north-west" {
border-width: $height $width 0 0;
border-top-color: $color;
}
}