buttons.less
2.6 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
/*
* Component: Button
* -----------------
*/
.btn {
/*.border-radius(@btn-border-radius);*/
.box-shadow(@btn-boxshadow);
border: 1px solid transparent;
&.uppercase {
text-transform: uppercase
}
// Flat buttons
&.btn-flat {
.border-radius(0);
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
border-width: 1px;
}
// Active state
&:active {
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
-moz-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
}
&:focus {
outline: none;
}
// input file btn
&.btn-file {
position: relative;
overflow: hidden;
> input[type='file'] {
position: absolute;
top: 0;
right: 0;
min-width: 100%;
min-height: 100%;
font-size: 100px;
text-align: right;
.opacity(0);
outline: none;
background: white;
cursor: inherit;
display: block;
}
}
}
//Button color variations
.btn-default {
background-color: #f4f4f4;
color: #444;
border-color: #ddd;
&:hover,
&:active,
&.hover {
background-color: darken(#f4f4f4, 5%);
}
}
.btn-outline {
border: 1px solid #fff;
background: transparent;
color: #fff;
&:hover,
&:focus,
&:active {
color: rgba(255, 255, 255, .7);
border-color: rgba(255, 255, 255, .7);
}
}
.btn-link {
.box-shadow(none);
}
//General .btn with bg class
.btn[class*='bg-']:hover {
.box-shadow(inset 0 0 100px rgba(0, 0, 0, 0.2));
}
// Application buttons
.btn-app {
.border-radius(3px);
position: relative;
padding: 15px 5px;
margin: 0 0 10px 10px;
min-width: 80px;
height: 60px;
text-align: center;
color: #666;
border: 1px solid #ddd;
background-color: #f4f4f4;
font-size: 12px;
//Icons within the btn
> .fa, > .glyphicon, > .ion {
font-size: 20px;
display: block;
}
&:hover {
background: #f4f4f4;
color: #444;
border-color: #aaa;
}
&:active, &:focus {
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
-moz-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
}
//The badge
> .badge {
position: absolute;
top: -3px;
right: -10px;
font-size: 10px;
font-weight: 400;
}
}