-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmixins.less
140 lines (129 loc) · 4.74 KB
/
mixins.less
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
/* Border Radius */
.borderRadius(@radius){
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
-o-border-radius: @radius;
-ms-border-radius: @radius;
border-radius: @radius;
}
/* Border Top Radius */
.borderTopRadius(@radius){
-webkit-border-top-left-radius: @radius;
-webkit-border-top-right-radius: @radius;
-moz-border-top-left-radius: @radius;
-moz-border-top-right-radius: @radius;
-o-border-top-left-radius: @radius;
-o-border-top-right-radius: @radius;
-ms-border-top-left-radius: @radius;
-ms-border-top-right-radius: @radius;
border-top-left-radius: @radius;
border-top-right-radius: @radius;
}
/* Border Right Radius */
.borderRightRadius(@radius){
-webkit-border-top-right-radius: @radius;
-webkit-border-bottom-right-radius: @radius;
-moz-border-top-right-radius: @radius;
-moz-border-bottom-right-radius: @radius;
-o-border-top-right-radius: @radius;
-o-border-bottom-right-radius: @radius;
-ms-border-top-right-radius: @radius;
-ms-border-bottom-right-radius: @radius;
border-top-right-radius: @radius;
border-bottom-right-radius: @radius;
}
/* Border Bottom Radius */
.borderBottomRadius(@radius){
-webkit-border-bottom-left-radius: @radius;
-webkit-border-bottom-right-radius: @radius;
-moz-border-bottom-left-radius: @radius;
-moz-border-bottom-right-radius: @radius;
-o-border-bottom-left-radius: @radius;
-o-border-bottom-right-radius: @radius;
-ms-border-bottom-left-radius: @radius;
-ms-border-bottom-right-radius: @radius;
border-bottom-left-radius: @radius;
border-bottom-right-radius: @radius;
}
/* Border Left Radius */
.borderLeftRadius(@radius){
-webkit-border-top-left-radius: @radius;
-webkit-border-bottom-left-radius: @radius;
-moz-border-top-left-radius: @radius;
-moz-border-bottom-left-radius: @radius;
-o-border-top-left-radius: @radius;
-o-border-bottom-left-radius: @radius;
-ms-border-top-left-radius: @radius;
-ms-border-bottom-left-radius: @radius;
border-top-left-radius: @radius;
border-bottom-left-radius: @radius;
}
/* Box Shadow */
.boxShadow(@x, @y, @blur, @spread, @color){
-webkit-box-shadow: @x @y @blur @spread @color;
-moz-box-shadow: @x @y @blur @spread @color;
-o-box-shadow: @x @y @blur @spread @color;
-ms-box-shadow: @x @y @blur @spread @color;
box-shadow: @x @y @blur @spread @color;
}
/* Inset Box Shadow */
.insetBoxShadow(@x, @y, @blur, @spread, @color){
-webkit-box-shadow: inset @x @y @blur @spread @color;
-moz-box-shadow: inset @x @y @blur @spread @color;
-o-box-shadow: inset @x @y @blur @spread @color;
-ms-box-shadow: inset @x @y @blur @spread @color;
box-shadow: inset @x @y @blur @spread @color;
}
/* Gradient (Left to Right) */
.gradientLeftRight(@from, @to){
background: @from;
background: -moz-linear-gradient(left, @from 0%, @to 100%);
background: -webkit-gradient(linear, left top, right top, color-stop(0%, @from), color-stop(100%, @to));
background: -webkit-linear-gradient(left, @from 0%, @to 100%);
background: -o-linear-gradient(left, @from 0%, @to 100%);
background: -ms-linear-gradient(left, @from 0%, @to 100%);
background: linear-gradient(to right, @from 0%, @to 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='@{from}', endColorstr='@{to}', GradientType=1);
}
/* Gradient (Top to Bottom) */
.gradientTopBottom(@from, @to){
background: @from;
background: -moz-linear-gradient(top, @from 0%, @to 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,@from), color-stop(100%,@to));
background: -webkit-linear-gradient(top, @from 0%,@to 100%);
background: -o-linear-gradient(top, @from 0%,@to 100%);
background: -ms-linear-gradient(top, @from 0%,@to 100%);
background: linear-gradient(to bottom, @from 0%,@to 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='@{from}', endColorstr='@{to}',GradientType=0);
}
/* Placeholder Color */
.placeholderColor(@color){
&::-webkit-input-placeholder{
color: @color;
}
&:-moz-placeholder{
color: @color;
}
&::-moz-placeholder{
color: @color;
}
&:-ms-input-placeholder{
color: @color;
}
}
/* Text Shadow */
.textShadow(@x, @y, @blur, @color){
-webkit-text-shadow: @x @y @blur @color;
-moz-text-shadow: @x @y @blur @color;
-o-text-shadow: @x @y @blur @color;
-ms-text-shadow: @x @y @blur @color;
text-shadow: @x @y @blur @color;
}
/* Transition - Can only be used to assign a single transition, not multiple */
.transition(@property, @duration:1.0s, @effect:ease, @delay:0s){
-webkit-transition: @property @duration @effect @delay;
-moz-transition: @property @duration @effect @delay;
-o-transition: @property @duration @effect @delay;
-ms-transition: @property @duration @effect @delay;
transition: @property @duration @effect @delay;
}