-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmixins.less
More file actions
109 lines (94 loc) · 3.48 KB
/
mixins.less
File metadata and controls
109 lines (94 loc) · 3.48 KB
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
.box-shadow (@x: 0px, @y: 0px, @blur: 1px, @color: #000) {
-moz-box-shadow: @arguments;
-webkit-box-shadow: @arguments;
box-shadow: @arguments;
}
.box-shadow (@inset, @x: 0px, @y: 0px, @blur: 1px, @color: #000) {
-moz-box-shadow: @arguments;
-webkit-box-shadow: @arguments;
box-shadow: @arguments;
}
.box-shadow (...) {
-moz-box-shadow: @arguments;
-webkit-box-shadow: @arguments;
box-shadow: @arguments;
}
.transition(@duration:0.2s, @ease:ease-out) {
-webkit-transition: all @duration @ease;
-moz-transition: all @duration @ease;
-ms-transition: all @duration @ease;
-o-transition: all @duration @ease;
transition: all @duration @ease;
}
.box-sizing(@box:border-box) {
-webit-box-sizing: @box;
-moz-box-sizing: @box;
-ms-box-sizing: @box;
-o-box-sizing: @box;
box-sizing: @box;
}
.border-radius(...) {
-webkit-border-radius: @arguments;
-moz-border-radius: @arguments;
-ms-border-radius: @arguments;
-o-border-radius: @arguments;
border-radius: @arguments;
}
.gradient (light, @color) {
background: @color;
background: -moz-linear-gradient(top, lighten(@color, 10%) 0%, @color 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, lighten(@color, 10%)), color-stop(100%, @color));
background: -webkit-linear-gradient(top, lighten(@color, 10%) 0%, @color 100%);
background: -o-linear-gradient(top, lighten(@color, 10%) 0%, @color 100%);
background: -ms-linear-gradient(top, lighten(@color, 10%) 0%, @color 100%);
background: linear-gradient(to bottom, lighten(@color, 10%) 0%, @color 100%);
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)", lighten(@color, 10%), @color));
}
.gradient (dark, @color) {
background: @color;
background: -moz-linear-gradient(top, @color 0%, darken(@color, 10%) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, @color), color-stop(100%, darken(@color, 10%)));
background: -webkit-linear-gradient(top, @color 0%, darken(@color, 10%) 100%);
background: -o-linear-gradient(top, @color 0%, darken(@color, 10%) 100%);
background: -ms-linear-gradient(top, @color 0%, darken(@color, 10%) 100%);
background: linear-gradient(to bottom, @color 0%, darken(@color, 10%) 100%);
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)", @color, darken(@color, 10%)));
}
.transform(...) {
-webkit-transform: @arguments;
-moz-transform: @arguments;
-o-transform: @arguments;
-ms-transform: @arguments;
transform: @arguments;
}
.rotate(@deg:5deg){
.transform(rotate(@deg));
}
.button(@color) {
border: 0px;
.border-radius(5px);
padding: 8px 20px;
margin-top: 20px;
line-height: 1;
.gradient(dark, @color);
color: fade(#fff, 95%);
font-weight: bold;
text-transform: uppercase;
text-shadow: 0px -1px 0px fade(#000, 50%);
.transition(0.1s);
.box-shadow(1px 2px 2px fade(#000, 50%)~"," inset 0px 1px 2px fade(#fff, 25%));
border-bottom: 4px solid darken(@color, 30%);
border-right: 1px solid darken(@color, 25%);
border-left: 1px solid darken(@color, 20%);
border-top: 1px solid darken(@color, 10%);
&:hover, &:focus {
color: #fff;
.gradient(light, @color);
}
&:active {
color: #fff;
.box-shadow(0px 1px 1px fade(#000, 50%)~"," inset 0px 1px 2px fade(#fff, 25%));
border-bottom-width: 1px;
margin-top: 23px;
}
}