-
Notifications
You must be signed in to change notification settings - Fork 45
/
_mixins.scss
107 lines (104 loc) · 3.37 KB
/
_mixins.scss
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
@mixin arrow($position, $width) {
@if ($position == 'top') {
transform: rotate(-45deg);
bottom: -$width * .5;
} @else if ($position == 'bottom') {
transform: rotate(135deg);
top: -$width * .5;
} @else if ($position == 'left') {
transform: rotate(225deg);
right: -$width * .5;
top: 50%;
} @else if ($position == 'right') {
transform: rotate(45deg);
left: -$width * .5;
top: 50%;
}
}
@mixin circle-transform-hide($position) {
@if ($position == 'top') {
transform: scale(0) translate(-50%, -50%);
} @else if ($position == 'bottom') {
transform: scale(0) translate(-50%, -50%);
} @else if ($position == 'left') {
transform: scale(0) translate(-50%, -33%);
} @else if ($position == 'right') {
transform: scale(0) translate(-50%, -33%);
}
}
@mixin ember-attacher-hide-transform($position, $animation) {
@if ($animation == 'perspective') {
@if ($position == 'top') {
transform: translateY(0) rotateX(90deg);
} @else if ($position == 'bottom') {
transform: translateY(0) rotateX(-90deg);
} @else if ($position == 'left') {
transform: translateX(0) rotateY(-90deg);
} @else if ($position == 'right') {
transform: translateX(0) rotateY(90deg);
}
} @else if ($animation == 'shift') {
@if ($position == 'top') {
transform: translateY(0);
} @else if ($position == 'bottom') {
transform: translateY(0);
} @else if ($position == 'left') {
transform: translateX(0);
} @else if ($position == 'right') {
transform: translateX(0);
}
} @else if ($animation == 'scale') {
@if ($position == 'top') {
transform: translateY(0) scale(0);
} @else if ($position == 'bottom') {
transform: translateY(0) scale(0);
} @else if ($position == 'left') {
transform: translateX(0) scale(0);
} @else if ($position == 'right') {
transform: translateX(0) scale(0);
}
} @else if ($animation == 'none') {
@if ($position == 'top') {
transform: translateY(-10px);
} @else if ($position == 'bottom') {
transform: translateY(10px);
} @else if ($position == 'left') {
transform: translateX(-10px);
} @else if ($position == 'right') {
transform: translateX(10px);
}
}
}
@mixin ember-attacher-show-transform($position, $animation) {
@if ($animation == 'perspective') {
@if ($position == 'top') {
transform: translateY(-10px) rotateX(0);
} @else if ($position == 'bottom') {
transform: translateY(10px) rotateX(0);
} @else if ($position == 'left') {
transform: translateX(-10px) rotateY(0);
} @else if ($position == 'right') {
transform: translateX(10px) rotateY(0);
}
} @else if ($animation == 'fade') {
@if ($position == 'top') {
transform: translateY(-10px);
} @else if ($position == 'bottom') {
transform: translateY(10px);
} @else if ($position == 'left') {
transform: translateX(-10px);
} @else if ($position == 'right') {
transform: translateX(10px);
}
} @else if ($animation == 'scale') {
@if ($position == 'top') {
transform: translateY(-10px) scale(1);
} @else if ($position == 'bottom') {
transform: translateY(10px) scale(1);
} @else if ($position == 'left') {
transform: translateX(-10px) scale(1);
} @else if ($position == 'right') {
transform: translateX(10px) scale(1);
}
}
}