Button.less
3.76 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
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
// Button
.@{prefix}-btn {
border: 1px solid mix(rgb(red(@btn-border-right), green(@btn-border-right), blue(@btn-border-right)), @panel-bg, 30%);
border-color: @btn-border-top @btn-border-right @btn-border-bottom @btn-border-left;
position: relative;
text-shadow: @text-shadow;
.inline-block();
.border-radius(3px);
.box-shadow(@btn-box-shadow);
.vertical-gradient(@btn-bg, @btn-bg-hlight);
&:hover, &:focus {
color: @btn-text;
.vertical-gradient(darken(@btn-bg, 5%), darken(@btn-bg-hlight, 5%));
border-color: @btn-border-hover;
}
&.@{prefix}-disabled button, &.@{prefix}-disabled:hover button {
cursor: default;
.box-shadow(none);
.opacity(@btn-box-disabled-opacity);
}
&.@{prefix}-active, &.@{prefix}-active:hover {
.vertical-gradient(darken(@btn-bg, 10%), darken(@btn-bg-hlight, 5%));
.box-shadow(@btn-box-shadow-active);
border-color: darken(@btn-bg, 20%);
}
&:active {
.vertical-gradient(darken(@btn-bg, 7%), darken(@btn-bg-hlight, 5%));
.box-shadow(@btn-box-shadow-active);
border-color: @btn-border-active;
}
}
.@{prefix}-btn button {
padding: @btn-padding;
font-size: @font-size;
line-height: @line-height;
*line-height: @line-height - 4px;
cursor: pointer;
color: @btn-text;
text-align: center;
// Fixes for default inner padding of button
overflow: visible; // IE7
-webkit-appearance: none; // WebKit
&::-moz-focus-inner { // Gecko
border: 0;
padding: 0;
}
}
.@{prefix}-btn i {
text-shadow: 1px 1px @btn-text-shadow;
}
.@{prefix}-primary.@{prefix}-btn-has-text {
min-width: 50px;
}
.@{prefix}-primary {
color: @btn-primary-text;
border: 1px solid transparent;
border-color: @btn-primary-border;
.vertical-gradient(@btn-primary-bg, @btn-primary-bg-hlight);
&:hover, &:focus {
.vertical-gradient(darken(@btn-primary-bg, 5%), darken(@btn-primary-bg-hlight, 5%));
border-color: @btn-primary-border-hover;
}
&.@{prefix}-disabled button, &.@{prefix}-disabled:hover button {
cursor: default;
.box-shadow(none);
.opacity(@btn-box-disabled-opacity);
}
&.@{prefix}-active, &.@{prefix}-active:hover, &:not(.@{prefix}-disabled):active {
.vertical-gradient(darken(@btn-primary-bg, 10%), darken(@btn-primary-bg-hlight, 10%));
.box-shadow(@btn-box-shadow-active);
}
}
.@{prefix}-primary button, .@{prefix}-primary button i {
color: @btn-primary-text;
text-shadow: 1px 1px @btn-primary-text-shadow;
}
.@{prefix}-btn .@{prefix}-txt {
font-size: inherit;
line-height: inherit;
color: inherit;
}
.@{prefix}-btn-large button {
padding: 9px 14px;
font-size: @font-size + 2px;
line-height: normal;
.border-radius(5px);
}
.@{prefix}-btn-large i {
margin-top: 2px;
}
.@{prefix}-btn-small button {
padding: 1px 5px;
font-size: @font-size - 2px;
*padding-bottom: 2px;
}
.@{prefix}-btn-small i {
line-height: 20px;
vertical-align: top;
*line-height: 18px;
}
.@{prefix}-btn .@{prefix}-caret {
margin-top: 8px;
margin-left: 0;
}
.@{prefix}-btn-small .@{prefix}-caret {
margin-top: 8px;
margin-left: 0;
}
.@{prefix}-caret {
.inline-block();
width: 0; height: 0;
vertical-align: top;
border-top: 4px solid @btn-caret-border;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
content: "";
}
.@{prefix}-disabled .@{prefix}-caret {
border-top-color: @text-disabled;
}
.@{prefix}-caret.@{prefix}-up {
border-bottom: 4px solid @btn-caret-border;
border-top: 0;
}
.@{prefix}-btn-flat {
border: 0;
background: transparent;
.border-radius(0);
.box-shadow(none);
filter: none;
}
.@{prefix}-btn-flat:hover, .@{prefix}-btn-flat.@{prefix}-active, .@{prefix}-btn-flat:focus, .@{prefix}-btn-flat:active {
border: 0;
background: @menubar-bg-active;
filter: none;
.box-shadow(none);
}
.@{prefix}-btn-has-text .@{prefix}-ico {
padding-right: 5px;
}
// RTL
.@{prefix}-rtl .@{prefix}-btn button {
direction: rtl;
}