-
Notifications
You must be signed in to change notification settings - Fork 0
/
mixins.less
83 lines (69 loc) · 1.79 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
// LessCSS mixin collection
// Mariusz Cieśla <[email protected]>
// Mixins
.inset-box {
-webkit-box-shadow: 0 1px 0 rgba(255,255,255,.5), inset 0 3px 3px rgba(0,0,0,.25);
-moz-box-shadow: 0 1px 0 rgba(255,255,255,.5), inset 0 3px 3px rgba(0,0,0,.25);
-ms-box-shadow: 0 1px 0 rgba(255,255,255,.5), inset 0 3px 3px rgba(0,0,0,.25);
-o-box-shadow: 0 1px 0 rgba(255,255,255,.5), inset 0 3px 3px rgba(0,0,0,.25);
box-shadow: 0 1px 0 rgba(255,255,255,.5), inset 0 3px 3px rgba(0,0,0,.25);
}
.inset-text {
text-shadow:0 1px 0 rgba(255,255,255,.5);
}
.border-radius (@radius) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
-ms-border-radius: @radius;
-o-border-radius: @radius;
}
.box-shadow(@shadow: 0 1px 3px rgba(0,0,0,.25)) {
-webkit-box-shadow: @shadow;
-moz-box-shadow: @shadow;
-ms-box-shadow: @shadow;
-o-box-shadow: @shadow;
box-shadow: @shadow;
}
.transition(@transition) {
-webkit-transition: @transition;
-moz-transition: @transition;
-ms-transition: @transition;
-o-transition: @transition;
transition: @transition;
}
.rotate(@degrees) {
-webkit-transform: rotate(@degrees);
-moz-transform: rotate(@degrees);
-ms-transform: rotate(@degrees);
-o-transform: rotate(@degrees);
transform: rotate(@degrees);
}
.opacity(@opacity: 100) {
-moz-opacity: @opacity / 100;
-webkit-opacity: @opacity / 100;
-ms-opacity: @opacity / 100;
-o-opacity: @opacity / 100;
opacity: @opacity / 100;
filter: e(%("alpha(opacity=%d)", @opacity));
}
// Clearfix from Twitter Bootstrap
.clearfix {
*zoom: 1;
&:before, &:after {
display:table;
content: "";
}
&:after {
clear:both;
}
}
// IE7 inline-block hack
.ie7-inline-block {
*display: inline;
*zoom: 1;
}
// Size
.size(@width: 5px, @height: 5px) {
width: @width;
height: @height;
}