-
Notifications
You must be signed in to change notification settings - Fork 1
/
mixins.less
72 lines (64 loc) · 1.92 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
/* --mixins */
/* border radius */
.border-radius(@radius: 0.3em) {
-webkit-border-radius: @radius;
-moz-border-radius : @radius;
border-radius : @radius;
}
/* --transforms */
.transform ( @trans ){
transform: @trans;
ms-transform: @trans;
-moz-tranform: @trans;
-webkit-transform: @trans;
-o-transform: @trans;
}
.transform-point ( @trans ) {
transform-origin: @trans;
-ms-transform-origin: @trans;
-moz-transform-origin: @trans;
-o-transform-origin: @trans;
-webkit-transform-origin: @trans;
}
/* usage: .transition( ~"transition, another transition" ); */
.transition( @trans ){
transition: @trans;
-moz-transition: @trans;
-webkit-transition: @trans;
-o-transition: @trans;
}
.transparency( @trans ){
@mstrans: @trans * 100;
filter: alpha(opacity=@mstrans);
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity="@mstrans")"; /* IE 8 */
-moz-opacity: @trans; /* Netscape */
-khtml-opacity: @trans; /* Safari 1.x */
opacity: @trans; /* Good browsers */
}
/* shadow */
/* usage: .box-shadow( ~"0 1px 0 red, 0 -1px 0 green" ); */
.box-shadow( @shadow ) {
-webkit-box-shadow: @shadow;
box-shadow : @shadow;
}
/* --box sizing */
.border-box {
-moz-box-sizing : border-box;
-webkit-box-sizing: border-box;
-ms-box-sizing : border-box;
box-sizing : border-box;
// < IE7 fallback
*behavior: url('static/css/boxsizing.htc'); //must be set per-project
}
.content-box {
-moz-box-sizing : content-box;
-webkit-box-sizing: content-box;
-ms-box-sizing : content-box;
box-sizing : content-box;
*behavior : none;
}
.vertical-center() {
position:relative;
top:50%;
.transform( translateY(-50%) );
}