提交 | 用户 | 时间
|
58d006
|
1 |
.enable_plugin_chosen() when(@enable-plugin-chosen = true) { |
A |
2 |
|
|
3 |
.chosen-container + .help-inline { |
|
4 |
vertical-align:middle; |
|
5 |
} |
|
6 |
|
|
7 |
//chosen select boxes -- replace icons with FontAwesome |
|
8 |
/** |
|
9 |
.chosen-select { |
|
10 |
display: inline !important; //for validation plugin to work it must be displayed |
|
11 |
visibility: hidden; |
|
12 |
opacity: 0; |
|
13 |
position: absolute; |
|
14 |
z-index: -1; |
|
15 |
width: 0; |
|
16 |
height: 0; |
|
17 |
border-width: 0; |
|
18 |
} |
|
19 |
*/ |
|
20 |
.chosen-container , [class*="chosen-container"]{ |
|
21 |
vertical-align: middle; |
|
22 |
> .chosen-single { |
|
23 |
line-height: 28px; |
|
24 |
height: 32px; |
|
25 |
box-shadow: none; |
|
26 |
background: #FAFAFA; |
|
27 |
} |
|
28 |
} |
|
29 |
|
|
30 |
.chosen-choices { |
|
31 |
box-shadow:none !important; |
|
32 |
} |
|
33 |
.chosen-container-single .chosen-single abbr { |
|
34 |
background: none; |
|
35 |
} |
|
36 |
.chosen-container-single .chosen-single abbr:after { |
|
37 |
content:"\f00d"; |
|
38 |
display: inline-block; |
|
39 |
color:#888; |
|
40 |
font-family: FontAwesome; |
|
41 |
font-size: @base-font-size; |
|
42 |
|
|
43 |
position: absolute; |
|
44 |
right: 0; |
|
45 |
top: -7px; |
|
46 |
} |
|
47 |
.chosen-container-single .chosen-single abbr:hover:after { |
|
48 |
color:#464646; |
|
49 |
} |
|
50 |
.chosen-container-single.chosen-disabled .chosen-single abbr:hover:after { |
|
51 |
color:#464646; |
|
52 |
} |
|
53 |
|
|
54 |
|
|
55 |
.chosen-single div b { |
|
56 |
background: none !important; |
|
57 |
&:before { |
|
58 |
content: "\f0d7"; |
|
59 |
display: inline-block; |
|
60 |
|
|
61 |
color: #888; |
|
62 |
font-family: FontAwesome; |
|
63 |
font-size: @base-font-size - 1; |
|
64 |
|
|
65 |
position: relative; |
|
66 |
top: -1px; |
|
67 |
left: 1px; |
|
68 |
} |
|
69 |
} |
|
70 |
.chosen-container-active.chosen-with-drop .chosen-single div b:before { |
|
71 |
content:"\f0d8"; |
|
72 |
} |
|
73 |
|
|
74 |
|
|
75 |
.chosen-container-single { |
|
76 |
.chosen-search { |
|
77 |
position:relative; |
|
78 |
input[type="text"] { |
|
79 |
background:none; |
|
80 |
border-radius:0; |
|
81 |
line-height:28px; |
|
82 |
height:28px; |
|
83 |
} |
|
84 |
&:after{ |
|
85 |
content:"\f002"; |
|
86 |
display:inline-block; |
|
87 |
|
|
88 |
color: #888; |
|
89 |
font-family: FontAwesome; |
|
90 |
font-size: @base-font-size + 1; |
|
91 |
|
|
92 |
position:absolute; |
|
93 |
top:8px; |
|
94 |
right:12px; |
|
95 |
} |
|
96 |
} |
|
97 |
} |
|
98 |
|
|
99 |
.chosen-container-multi .chosen-choices li.search-field input[type="text"] { |
|
100 |
height:25px; |
|
101 |
} |
|
102 |
.chosen-container-multi .chosen-choices li.search-choice { |
|
103 |
line-height: 16px; |
|
104 |
padding-bottom: 4px; |
|
105 |
} |
|
106 |
|
|
107 |
|
|
108 |
|
|
109 |
.chosen-container-multi .chosen-choices li.search-choice .search-choice-close { |
|
110 |
background:none; |
|
111 |
|
|
112 |
&:before { |
|
113 |
content:"\f00d"; |
|
114 |
display: inline-block; |
|
115 |
color:#888; |
|
116 |
font-family:FontAwesome; |
|
117 |
font-size: @base-font-size; |
|
118 |
|
|
119 |
position: absolute; |
|
120 |
right: 2px; |
|
121 |
top: -1px; |
|
122 |
} |
|
123 |
&:hover { |
|
124 |
text-decoration:none; |
|
125 |
} |
|
126 |
&:hover:before { |
|
127 |
color:#464646; |
|
128 |
} |
|
129 |
} |
|
130 |
.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close:before { |
|
131 |
color:#464646; |
|
132 |
} |
|
133 |
|
|
134 |
|
|
135 |
.chosen-container .chosen-results-scroll-down , |
|
136 |
.chosen-container .chosen-results-scroll-up { |
|
137 |
span { |
|
138 |
background: none; |
|
139 |
&:before{ |
|
140 |
content: "\f0d7"; |
|
141 |
display: inline-block; |
|
142 |
|
|
143 |
color: #888; |
|
144 |
font-family: FontAwesome; |
|
145 |
font-size: @base-font-size - 1; |
|
146 |
|
|
147 |
position: relative; |
|
148 |
top: -1px; |
|
149 |
left: 1px; |
|
150 |
} |
|
151 |
} |
|
152 |
|
|
153 |
} |
|
154 |
.chosen-container .chosen-results-scroll-up span:before { |
|
155 |
content:"\f0d8"; |
|
156 |
} |
|
157 |
.chosen-container-active .chosen-single-with-drop div b:before { |
|
158 |
content:"\f0d8"; |
|
159 |
} |
|
160 |
|
|
161 |
|
|
162 |
.chosen-rtl .chosen-search { |
|
163 |
input[type="text"] { |
|
164 |
background: none; |
|
165 |
} |
|
166 |
&:after { |
|
167 |
content:""; |
|
168 |
display:none; |
|
169 |
} |
|
170 |
&:before { |
|
171 |
content: "\f002"; |
|
172 |
display: inline-block; |
|
173 |
|
|
174 |
color: #888; |
|
175 |
font-family: FontAwesome; |
|
176 |
font-size: @base-font-size + 1; |
|
177 |
|
|
178 |
position: absolute; |
|
179 |
top: 9px; |
|
180 |
left: 12px; |
|
181 |
} |
|
182 |
} |
|
183 |
|
|
184 |
|
|
185 |
|
|
186 |
/** chosen - etc */ |
|
187 |
.chosen-container-single .chosen-single { |
|
188 |
border-radius:0; |
|
189 |
} |
|
190 |
.chosen-container .chosen-results li.highlighted { |
|
191 |
// background:#86BD6F;/* green */ |
|
192 |
//background:#4492C9;/* blue1 */ |
|
193 |
background:#316AC5; |
|
194 |
color: #FFF; |
|
195 |
} |
|
196 |
.chosen-container-single .chosen-drop { |
|
197 |
border-radius:0; |
|
198 |
border-bottom:3px solid #4492C9; |
|
199 |
border-color:#4492C9; |
|
200 |
} |
|
201 |
.chosen-single.chosen-single-with-drop , .chosen-container-active .chosen-single{ |
|
202 |
border-color:#4492C9; |
|
203 |
} |
|
204 |
|
|
205 |
.chosen-single { |
|
206 |
.form-group.has-error & { |
|
207 |
border-color:@error-state-border !important; |
|
208 |
} |
|
209 |
.form-group.has-info & { |
|
210 |
border-color:@info-state-border !important; |
|
211 |
} |
|
212 |
.form-group.has-warning & { |
|
213 |
border-color:@warning-state-border !important; |
|
214 |
} |
|
215 |
.form-group.has-success & { |
|
216 |
border-color:@success-state-border !important; |
|
217 |
} |
|
218 |
} |
|
219 |
|
|
220 |
//.chosen-rtl .chosen-container-single-nosearch .chosen-search { left: -9999px; } |
|
221 |
//.chosen-rtl .chosen-drop { left: -9999px; } |
|
222 |
|
|
223 |
// .modal .chosen-rtl .chosen-container-single-nosearch .chosen-search { left: 9999px; } |
|
224 |
// .modal .chosen-rtl .chosen-drop { left: 9999px; } |
|
225 |
//.rtl .modal .chosen-container.chosen-with-drop .chosen-drop { left: auto; right: 0; } |
|
226 |
|
|
227 |
|
|
228 |
|
|
229 |
.chosen-container-active.chosen-with-drop .chosen-single { |
|
230 |
border-color:#4492C9; |
|
231 |
} |
|
232 |
|
|
233 |
|
|
234 |
//.chosen-container .chosen-drop { |
|
235 |
//display: none; |
|
236 |
//} |
|
237 |
.chosen-container.chosen-with-drop .chosen-drop { |
|
238 |
left: auto; |
|
239 |
right: auto; |
|
240 |
display: block; |
|
241 |
} |
|
242 |
|
|
243 |
|
|
244 |
|
|
245 |
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 144dpi) { |
|
246 |
.chosen-rtl .chosen-search input[type="text"], .chosen-container-single .chosen-single abbr, .chosen-container-single .chosen-single div b, .chosen-container-single .chosen-search input[type="text"], .chosen-container-multi .chosen-choices li.search-choice .search-choice-close, .chosen-container .chosen-results-scroll-down span, .chosen-container .chosen-results-scroll-up span { |
|
247 |
background-image: none !important; |
|
248 |
background-repeat: no-repeat !important; |
|
249 |
background-size: auto !important; |
|
250 |
} |
|
251 |
} |
|
252 |
|
|
253 |
|
|
254 |
|
|
255 |
|
|
256 |
|
|
257 |
|
|
258 |
|
|
259 |
|
|
260 |
//a second style (like tag inpit) |
|
261 |
.enable_plugin_chosen_style_2() when(@enable-plugin-chosen-style-2 = true) { |
|
262 |
.tag-input-style + .chosen-container-multi { |
|
263 |
.chosen-choices li.search-choice { |
|
264 |
background-image:none; |
|
265 |
background-color:@tag-bg; |
|
266 |
color: #FFFFFF; |
|
267 |
display: inline-block; |
|
268 |
font-size: @base-font-size; |
|
269 |
font-weight: normal; |
|
270 |
margin-bottom: 3px; |
|
271 |
margin-right: 3px; |
|
272 |
padding: 6px 22px 7px 9px; |
|
273 |
position: relative; |
|
274 |
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.15); |
|
275 |
transition: all 0.2s ease 0s; |
|
276 |
vertical-align: baseline; |
|
277 |
white-space: nowrap; |
|
278 |
|
|
279 |
border:none; |
|
280 |
.box-shadow(none); |
|
281 |
.border-radius(0); |
|
282 |
|
|
283 |
.search-choice-close { |
|
284 |
position:absolute; |
|
285 |
top:0; bottom:0; |
|
286 |
right:0; |
|
287 |
width:18px; |
|
288 |
height:auto; |
|
289 |
line-height:25px; |
|
290 |
text-align:center; |
|
291 |
|
|
292 |
&:before { |
|
293 |
color:#FFF; |
|
294 |
position:static; |
|
295 |
font-size: @base-font-size - 2; |
|
296 |
} |
|
297 |
|
|
298 |
&:hover { |
|
299 |
background-color:rgba(0,0,0,0.2); |
|
300 |
&:before { |
|
301 |
color:#FFF; |
|
302 |
} |
|
303 |
} |
|
304 |
} |
|
305 |
} |
|
306 |
} |
|
307 |
.tag-input-style + .chosen-container-multi.chosen-rtl { |
|
308 |
.chosen-choices li.search-choice { |
|
309 |
padding: 6px 9px 7px 22px; |
|
310 |
margin-left: 0; |
|
311 |
margin-right:3px !important;//to override .RTL's |
|
312 |
|
|
313 |
.search-choice-close { |
|
314 |
right:auto; |
|
315 |
left:0; |
|
316 |
} |
|
317 |
} |
|
318 |
} |
|
319 |
} |
|
320 |
.enable_plugin_chosen_style_2(); |
|
321 |
|
|
322 |
|
|
323 |
} |
|
324 |
.enable_plugin_chosen(); |