-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathmixins.less
157 lines (138 loc) · 4.33 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
a img {
border: none;
}
.clear {
clear: both;
}
.clickable {
cursor: pointer;
}
.nobullets{
list-style-type:none;
}
.boxshadow(@bsLeft, @bsTop, @bsBlur, @bsColor){
-moz-box-shadow:@bsLeft @bsTop @bsBlur @bsColor;
-webkit-box-shadow:@bsLeft @bsTop @bsBlur @bsColor;
-o-box-shadow:@bsLeft @bsTop @bsBlur @bsColor;
box-shadow:@bsLeft @bsTop @bsBlur @bsColor;
}
.radius(@rad){
-webkit-border-radius: @rad;
-moz-border-radius: @rad;
border-radius: @rad;
}
.radiusTop(@rad:10px)
{
-webkit-border-top-left-radius: @rad;
-webkit-border-top-right-radius: @rad;
-moz-border-radius-topleft: @rad;
-moz-border-radius-topright: @rad;
border-top-left-radius: @rad;
border-top-right-radius: @rad;
}
.radiusBottom(@rad:10px)
{
-webkit-border-bottom-left-radius: @rad;
-webkit-border-bottom-right-radius: @rad;
-moz-border-radius-bottomleft: @rad;
-moz-border-radius-bottomright: @rad;
border-bottom-left-radius: @rad;
border-bottom-right-radius: @rad;
}
.radiusLeft(@rad:10px)
{
-webkit-border-top-left-radius: @rad;
-webkit-border-bottom-left-radius: @rad;
-moz-border-radius-topleft: @rad;
-moz-border-radius-bottomleft: @rad;
border-top-left-radius: @rad;
border-bottom-left-radius: @rad;
}
.radiusRight(@rad:10px)
{
-webkit-border-top-right-radius: @rad;
-webkit-border-bottom-right-radius: @rad;
-moz-border-radius-topright: @rad;
-moz-border-radius-bottomright: @rad;
border-top-right-radius: @rad;
border-bottom-right-radius: @rad;
}
.radiusTopLeft(@rad:10px)
{
-webkit-border-top-left-radius: @rad;
-moz-border-radius-topleft: @rad;
border-top-left-radius: @rad;
}
.radiusTopRight(@rad:10px)
{
-webkit-border-top-right-radius: @rad;
-moz-border-radius-topright: @rad;
border-top-right-radius: @rad;
}
.radiusBottomLeft(@rad:10px)
{
-webkit-border-bottom-left-radius: @rad;
-moz-border-radius-bottomleft: @rad;
border-bottom-left-radius: @rad;
}
.radiusBottomRight(@rad:10px)
{
-webkit-border-bottom-right-radius: @rad;
-moz-border-radius-bottomright: @rad;
border-bottom-right-radius: @rad;
}
.opacity(@op:100)
{
// Work around, see https://github.com/cloudhead/less.js/issues/133
filter: e(%("alpha(opacity=%s)", @op));
-moz-opacity:@op/100;
-khtml-opacity:@op/100;
opacity:@op/100;
}
.linearGradient(@from:#000, @to:#EEE)
{
background: @from;
background-image: -webkit-gradient(linear, left top, left bottom, from(@from), to(@to));
background-image: -moz-linear-gradient(top, @from, @to);
filter: formatstring("progid:DXImageTransform.Microsoft.gradient(startColorstr='{0}', endColorstr='{1}')", @from, @to); /* IE6,IE7 */
-ms-filter: formatstring("\"progid:DXImageTransform.Microsoft.gradient(startColorStr='{0}', EndColorStr='{1}')\"", @from, @to); /* IE8 */
}
.transition(@range: all, @time: 1s, @ease: ease-in-out)
{
-moz-transition: @range @time @ease;
-webkit-transition: @range @time @ease;
-o-transition: @range @time @ease;
transition: @range @time @ease;
}
.skew(@angle_x:35, @angle_y:0)
{
-webkit-transform: skew(formatstring("{0}deg", @angle_x), formatstring("{0}deg", @angle_y));
-moz-transform: skew(formatstring("{0}deg", @angle_x), formatstring("{0}deg", @angle_y));
-o-transform: skew(formatstring("{0}deg", @angle_x), formatstring("{0}deg", @angle_y));
-ms-transform: skew(formatstring("{0}deg", @angle_x), formatstring("{0}deg", @angle_y));
transform: skew(formatstring("{0}deg", @angle_x), formatstring("{0}deg", @angle_y));
}
.scale(@scale_x: 1)
{
-webkit-transform: scale(@scale_x);
-moz-transform: scale(@scale_x);
-o-transform: scale(@scale_x);
-ms-transform: scale(@scale_x);
transform: scale(@scale_x);
}
.rotate(@angle:35)
{
-webkit-transform: rotate(formatstring("{0}deg", @deg));
-moz-transform: rotate(formatstring("{0}deg", @deg));
-o-transform: rotate(formatstring("{0}deg", @deg));
-ms-transform: rotate(formatstring("{0}deg", @deg));
transform: rotate(formatstring("{0}deg", @deg));
}
.translate(@move_x: 10px, @move_y: 10px)
{
-webkit-transform: translate(@move_x, @move_y);
-moz-transform: translate(@move_x, @move_y);
-o-transform: translate(@move_x, @move_y);
-ms-transform:translate(@move_x, @move_y);
transform: translate(@move_x, @move_y);
}