##// END OF EJS Templates
ui: small styling of buttons
marcink -
r4122:b9b13af3 default
parent child Browse files
Show More
@@ -1,523 +1,525 b''
1
1
2
2
3 //BUTTONS
3 //BUTTONS
4 button,
4 button,
5 .btn,
5 .btn,
6 input[type="button"] {
6 input[type="button"] {
7 -webkit-appearance: none;
7 -webkit-appearance: none;
8 display: inline-block;
8 display: inline-block;
9 margin: 0 @padding/3 0 0;
9 margin: 0 @padding/3 0 0;
10 padding: @button-padding;
10 padding: @button-padding;
11 text-align: center;
11 text-align: center;
12 font-size: @basefontsize;
12 font-size: @basefontsize;
13 line-height: 1em;
13 line-height: 1em;
14 font-family: @text-light;
14 font-family: @text-light;
15 text-decoration: none;
15 text-decoration: none;
16 text-shadow: none;
16 text-shadow: none;
17 color: @grey2;
17 color: @grey2;
18 background-color: white;
18 background-color: white;
19 background-image: none;
19 background-image: none;
20 border: none;
20 border: none;
21 .border ( @border-thickness-buttons, @grey5 );
21 .border ( @border-thickness-buttons, @grey5 );
22 .border-radius (@border-radius);
22 .border-radius (@border-radius);
23 cursor: pointer;
23 cursor: pointer;
24 white-space: nowrap;
24 white-space: nowrap;
25 -webkit-transition: background .3s,color .3s;
25 -webkit-transition: background .3s,color .3s;
26 -moz-transition: background .3s,color .3s;
26 -moz-transition: background .3s,color .3s;
27 -o-transition: background .3s,color .3s;
27 -o-transition: background .3s,color .3s;
28 transition: background .3s,color .3s;
28 transition: background .3s,color .3s;
29 box-shadow: @button-shadow;
29 box-shadow: @button-shadow;
30 -webkit-box-shadow: @button-shadow;
30 -webkit-box-shadow: @button-shadow;
31
31
32
32
33
33
34 a {
34 a {
35 display: block;
35 display: block;
36 margin: 0;
36 margin: 0;
37 padding: 0;
37 padding: 0;
38 color: inherit;
38 color: inherit;
39 text-decoration: none;
39 text-decoration: none;
40
40
41 &:hover {
41 &:hover {
42 text-decoration: none;
42 text-decoration: none;
43 }
43 }
44 }
44 }
45
45
46 &:focus,
46 &:focus,
47 &:active {
47 &:active {
48 outline:none;
48 outline:none;
49 }
49 }
50
50 &:hover {
51 &:hover {
51 color: @rcdarkblue;
52 color: @rcdarkblue;
52 background-color: @white;
53 background-color: @grey6;
53 .border ( @border-thickness, @grey4 );
54
55 }
56
57 &.btn-active {
58 color: @rcdarkblue;
59 background-color: @grey6;
54 }
60 }
55
61
56 .icon-remove {
62 .icon-remove {
57 display: none;
63 display: none;
58 }
64 }
59
65
60 //disabled buttons
66 //disabled buttons
61 //last; overrides any other styles
67 //last; overrides any other styles
62 &:disabled {
68 &:disabled {
63 opacity: .7;
69 opacity: .7;
64 cursor: auto;
70 cursor: auto;
65 background-color: white;
71 background-color: white;
66 color: @grey4;
72 color: @grey4;
67 text-shadow: none;
73 text-shadow: none;
68 }
74 }
69
75
70 &.no-margin {
76 &.no-margin {
71 margin: 0 0 0 0;
77 margin: 0 0 0 0;
72 }
78 }
73
79
74 &.btn-active {
80
75 color: @rcdarkblue;
76 background-color: @white;
77 .border ( @border-thickness, @rcdarkblue );
78 }
79
81
80 }
82 }
81
83
82
84
83 .btn-default {
85 .btn-default {
84 border: @border-thickness solid @grey5;
86 border: @border-thickness solid @grey5;
85 background-image: none;
87 background-image: none;
86 color: @grey2;
88 color: @grey2;
87
89
88 a {
90 a {
89 color: @grey2;
91 color: @grey2;
90 }
92 }
91
93
92 &:hover,
94 &:hover,
93 &.active {
95 &.active {
94 color: @rcdarkblue;
96 color: @rcdarkblue;
95 background-color: @white;
97 background-color: @white;
96 .border ( @border-thickness, @grey4 );
98 .border ( @border-thickness, @grey4 );
97
99
98 a {
100 a {
99 color: @grey2;
101 color: @grey2;
100 }
102 }
101 }
103 }
102 &:disabled {
104 &:disabled {
103 .border ( @border-thickness-buttons, @grey5 );
105 .border ( @border-thickness-buttons, @grey5 );
104 background-color: transparent;
106 background-color: transparent;
105 }
107 }
106 &.btn-active {
108 &.btn-active {
107 color: @rcdarkblue;
109 color: @rcdarkblue;
108 background-color: @white;
110 background-color: @white;
109 .border ( @border-thickness, @rcdarkblue );
111 .border ( @border-thickness, @rcdarkblue );
110 }
112 }
111 }
113 }
112
114
113 .btn-primary,
115 .btn-primary,
114 .btn-small, /* TODO: anderson: remove .btn-small to not mix with the new btn-sm */
116 .btn-small, /* TODO: anderson: remove .btn-small to not mix with the new btn-sm */
115 .btn-success {
117 .btn-success {
116 .border ( @border-thickness, @rcblue );
118 .border ( @border-thickness, @rcblue );
117 background-color: @rcblue;
119 background-color: @rcblue;
118 color: white;
120 color: white;
119
121
120 a {
122 a {
121 color: white;
123 color: white;
122 }
124 }
123
125
124 &:hover,
126 &:hover,
125 &.active {
127 &.active {
126 .border ( @border-thickness, @rcdarkblue );
128 .border ( @border-thickness, @rcdarkblue );
127 color: white;
129 color: white;
128 background-color: @rcdarkblue;
130 background-color: @rcdarkblue;
129
131
130 a {
132 a {
131 color: white;
133 color: white;
132 }
134 }
133 }
135 }
134 &:disabled {
136 &:disabled {
135 background-color: @rcblue;
137 background-color: @rcblue;
136 }
138 }
137 }
139 }
138
140
139 .btn-secondary {
141 .btn-secondary {
140 &:extend(.btn-default);
142 &:extend(.btn-default);
141
143
142 background-color: white;
144 background-color: white;
143
145
144 &:focus {
146 &:focus {
145 outline: 0;
147 outline: 0;
146 }
148 }
147
149
148 &:hover {
150 &:hover {
149 &:extend(.btn-default:hover);
151 &:extend(.btn-default:hover);
150 }
152 }
151
153
152 &.btn-link {
154 &.btn-link {
153 &:extend(.btn-link);
155 &:extend(.btn-link);
154 color: @rcblue;
156 color: @rcblue;
155 }
157 }
156
158
157 &:disabled {
159 &:disabled {
158 color: @rcblue;
160 color: @rcblue;
159 background-color: white;
161 background-color: white;
160 }
162 }
161 }
163 }
162
164
163 .btn-warning,
165 .btn-warning,
164 .btn-danger,
166 .btn-danger,
165 .revoke_perm,
167 .revoke_perm,
166 .btn-x,
168 .btn-x,
167 .form .action_button.btn-x {
169 .form .action_button.btn-x {
168 .border ( @border-thickness, @alert2 );
170 .border ( @border-thickness, @alert2 );
169 background-color: white;
171 background-color: white;
170 color: @alert2;
172 color: @alert2;
171
173
172 a {
174 a {
173 color: @alert2;
175 color: @alert2;
174 }
176 }
175
177
176 &:hover,
178 &:hover,
177 &.active {
179 &.active {
178 .border ( @border-thickness, @alert2 );
180 .border ( @border-thickness, @alert2 );
179 color: white;
181 color: white;
180 background-color: @alert2;
182 background-color: @alert2;
181
183
182 a {
184 a {
183 color: white;
185 color: white;
184 }
186 }
185 }
187 }
186
188
187 i {
189 i {
188 display:none;
190 display:none;
189 }
191 }
190
192
191 &:disabled {
193 &:disabled {
192 background-color: white;
194 background-color: white;
193 color: @alert2;
195 color: @alert2;
194 }
196 }
195 }
197 }
196
198
197 .btn-approved-status {
199 .btn-approved-status {
198 .border ( @border-thickness, @alert1 );
200 .border ( @border-thickness, @alert1 );
199 background-color: white;
201 background-color: white;
200 color: @alert1;
202 color: @alert1;
201
203
202 }
204 }
203
205
204 .btn-rejected-status {
206 .btn-rejected-status {
205 .border ( @border-thickness, @alert2 );
207 .border ( @border-thickness, @alert2 );
206 background-color: white;
208 background-color: white;
207 color: @alert2;
209 color: @alert2;
208 }
210 }
209
211
210 .btn-sm,
212 .btn-sm,
211 .btn-mini,
213 .btn-mini,
212 .field-sm .btn {
214 .field-sm .btn {
213 padding: @padding/3;
215 padding: @padding/3;
214 }
216 }
215
217
216 .btn-xs {
218 .btn-xs {
217 padding: @padding/4;
219 padding: @padding/4;
218 }
220 }
219
221
220 .btn-lg {
222 .btn-lg {
221 padding: @padding * 1.2;
223 padding: @padding * 1.2;
222 }
224 }
223
225
224 .btn-group {
226 .btn-group {
225 display: inline-block;
227 display: inline-block;
226 .btn {
228 .btn {
227 float: left;
229 float: left;
228 margin: 0 0 0 0;
230 margin: 0 0 0 0;
229 // first item
231 // first item
230 &:first-of-type:not(:last-of-type) {
232 &:first-of-type:not(:last-of-type) {
231 border-radius: @border-radius 0 0 @border-radius;
233 border-radius: @border-radius 0 0 @border-radius;
232
234
233 }
235 }
234 // middle elements
236 // middle elements
235 &:not(:first-of-type):not(:last-of-type) {
237 &:not(:first-of-type):not(:last-of-type) {
236 border-radius: 0;
238 border-radius: 0;
237 border-left-width: 0;
239 border-left-width: 0;
238 border-right-width: 0;
240 border-right-width: 0;
239 }
241 }
240 // last item
242 // last item
241 &:last-of-type:not(:first-of-type) {
243 &:last-of-type:not(:first-of-type) {
242 border-radius: 0 @border-radius @border-radius 0;
244 border-radius: 0 @border-radius @border-radius 0;
243 }
245 }
244
246
245 &:only-child {
247 &:only-child {
246 border-radius: @border-radius;
248 border-radius: @border-radius;
247 }
249 }
248 }
250 }
249
251
250 }
252 }
251
253
252
254
253 .btn-group-actions {
255 .btn-group-actions {
254 position: relative;
256 position: relative;
255 z-index: 100;
257 z-index: 100;
256
258
257 &:not(.open) .btn-action-switcher-container {
259 &:not(.open) .btn-action-switcher-container {
258 display: none;
260 display: none;
259 }
261 }
260 }
262 }
261
263
262
264
263 .btn-action-switcher-container{
265 .btn-action-switcher-container{
264 position: absolute;
266 position: absolute;
265 top: 30px;
267 top: 30px;
266 left: 0px;
268 left: 0px;
267 }
269 }
268
270
269 .btn-action-switcher {
271 .btn-action-switcher {
270 display: block;
272 display: block;
271 position: relative;
273 position: relative;
272 z-index: 300;
274 z-index: 300;
273 min-width: 240px;
275 min-width: 240px;
274 max-width: 500px;
276 max-width: 500px;
275 margin-top: 4px;
277 margin-top: 4px;
276 margin-bottom: 24px;
278 margin-bottom: 24px;
277 font-size: 14px;
279 font-size: 14px;
278 font-weight: 400;
280 font-weight: 400;
279 padding: 8px 0;
281 padding: 8px 0;
280 background-color: #fff;
282 background-color: #fff;
281 border: 1px solid @grey4;
283 border: 1px solid @grey4;
282 border-radius: 3px;
284 border-radius: 3px;
283 box-shadow: @dropdown-shadow;
285 box-shadow: @dropdown-shadow;
284
286
285 li {
287 li {
286 display: block;
288 display: block;
287 text-align: left;
289 text-align: left;
288 list-style: none;
290 list-style: none;
289 padding: 5px 10px;
291 padding: 5px 10px;
290 }
292 }
291
293
292 li .action-help-block {
294 li .action-help-block {
293 font-size: 10px;
295 font-size: 10px;
294 line-height: normal;
296 line-height: normal;
295 color: @grey4;
297 color: @grey4;
296 }
298 }
297
299
298 }
300 }
299
301
300 .btn-link {
302 .btn-link {
301 background: transparent;
303 background: transparent;
302 border: none;
304 border: none;
303 padding: 0;
305 padding: 0;
304 color: @rcblue;
306 color: @rcblue;
305
307
306 &:hover {
308 &:hover {
307 background: transparent;
309 background: transparent;
308 border: none;
310 border: none;
309 color: @rcdarkblue;
311 color: @rcdarkblue;
310 }
312 }
311
313
312 //disabled buttons
314 //disabled buttons
313 //last; overrides any other styles
315 //last; overrides any other styles
314 &:disabled {
316 &:disabled {
315 opacity: .7;
317 opacity: .7;
316 cursor: auto;
318 cursor: auto;
317 background-color: white;
319 background-color: white;
318 color: @grey4;
320 color: @grey4;
319 text-shadow: none;
321 text-shadow: none;
320 }
322 }
321
323
322 // TODO: johbo: Check if we can avoid this, indicates that the structure
324 // TODO: johbo: Check if we can avoid this, indicates that the structure
323 // is not yet good.
325 // is not yet good.
324 // lisa: The button CSS reflects the button HTML; both need a cleanup.
326 // lisa: The button CSS reflects the button HTML; both need a cleanup.
325 &.btn-danger {
327 &.btn-danger {
326 color: @alert2;
328 color: @alert2;
327
329
328 &:hover {
330 &:hover {
329 color: darken(@alert2,30%);
331 color: darken(@alert2,30%);
330 }
332 }
331
333
332 &:disabled {
334 &:disabled {
333 color: @alert2;
335 color: @alert2;
334 }
336 }
335 }
337 }
336 }
338 }
337
339
338 .btn-social {
340 .btn-social {
339 &:extend(.btn-default);
341 &:extend(.btn-default);
340 margin: 5px 5px 5px 0px;
342 margin: 5px 5px 5px 0px;
341 min-width: 160px;
343 min-width: 160px;
342 }
344 }
343
345
344 // TODO: johbo: check these exceptions
346 // TODO: johbo: check these exceptions
345
347
346 .links {
348 .links {
347
349
348 .btn + .btn {
350 .btn + .btn {
349 margin-top: @padding;
351 margin-top: @padding;
350 }
352 }
351 }
353 }
352
354
353
355
354 .action_button {
356 .action_button {
355 display:inline;
357 display:inline;
356 margin: 0;
358 margin: 0;
357 padding: 0 1em 0 0;
359 padding: 0 1em 0 0;
358 font-size: inherit;
360 font-size: inherit;
359 color: @rcblue;
361 color: @rcblue;
360 border: none;
362 border: none;
361 border-radius: 0;
363 border-radius: 0;
362 background-color: transparent;
364 background-color: transparent;
363
365
364 &.last-item {
366 &.last-item {
365 border: none;
367 border: none;
366 padding: 0 0 0 0;
368 padding: 0 0 0 0;
367 }
369 }
368
370
369 &:last-child {
371 &:last-child {
370 border: none;
372 border: none;
371 padding: 0 0 0 0;
373 padding: 0 0 0 0;
372 }
374 }
373
375
374 &:hover {
376 &:hover {
375 color: @rcdarkblue;
377 color: @rcdarkblue;
376 background-color: transparent;
378 background-color: transparent;
377 border: none;
379 border: none;
378 }
380 }
379 }
381 }
380 .grid_delete {
382 .grid_delete {
381 .action_button {
383 .action_button {
382 border: none;
384 border: none;
383 }
385 }
384 }
386 }
385
387
386
388
387 // TODO: johbo: Form button tweaks, check if we can use the classes instead
389 // TODO: johbo: Form button tweaks, check if we can use the classes instead
388 input[type="submit"] {
390 input[type="submit"] {
389 &:extend(.btn-primary);
391 &:extend(.btn-primary);
390
392
391 &:focus {
393 &:focus {
392 outline: 0;
394 outline: 0;
393 }
395 }
394
396
395 &:hover {
397 &:hover {
396 &:extend(.btn-primary:hover);
398 &:extend(.btn-primary:hover);
397 }
399 }
398
400
399 &.btn-link {
401 &.btn-link {
400 &:extend(.btn-link);
402 &:extend(.btn-link);
401 color: @rcblue;
403 color: @rcblue;
402
404
403 &:disabled {
405 &:disabled {
404 color: @rcblue;
406 color: @rcblue;
405 background-color: transparent;
407 background-color: transparent;
406 }
408 }
407 }
409 }
408
410
409 &:disabled {
411 &:disabled {
410 .border ( @border-thickness-buttons, @rcblue );
412 .border ( @border-thickness-buttons, @rcblue );
411 background-color: @rcblue;
413 background-color: @rcblue;
412 color: white;
414 color: white;
413 opacity: 0.5;
415 opacity: 0.5;
414 }
416 }
415 }
417 }
416
418
417 input[type="reset"] {
419 input[type="reset"] {
418 &:extend(.btn-default);
420 &:extend(.btn-default);
419
421
420 // TODO: johbo: Check if this tweak can be avoided.
422 // TODO: johbo: Check if this tweak can be avoided.
421 background: transparent;
423 background: transparent;
422
424
423 &:focus {
425 &:focus {
424 outline: 0;
426 outline: 0;
425 }
427 }
426
428
427 &:hover {
429 &:hover {
428 &:extend(.btn-default:hover);
430 &:extend(.btn-default:hover);
429 }
431 }
430
432
431 &.btn-link {
433 &.btn-link {
432 &:extend(.btn-link);
434 &:extend(.btn-link);
433 color: @rcblue;
435 color: @rcblue;
434
436
435 &:disabled {
437 &:disabled {
436 border: none;
438 border: none;
437 }
439 }
438 }
440 }
439
441
440 &:disabled {
442 &:disabled {
441 .border ( @border-thickness-buttons, @rcblue );
443 .border ( @border-thickness-buttons, @rcblue );
442 background-color: white;
444 background-color: white;
443 color: @rcblue;
445 color: @rcblue;
444 }
446 }
445 }
447 }
446
448
447 input[type="submit"],
449 input[type="submit"],
448 input[type="reset"] {
450 input[type="reset"] {
449 &.btn-danger {
451 &.btn-danger {
450 &:extend(.btn-danger);
452 &:extend(.btn-danger);
451
453
452 &:focus {
454 &:focus {
453 outline: 0;
455 outline: 0;
454 }
456 }
455
457
456 &:hover {
458 &:hover {
457 &:extend(.btn-danger:hover);
459 &:extend(.btn-danger:hover);
458 }
460 }
459
461
460 &.btn-link {
462 &.btn-link {
461 &:extend(.btn-link);
463 &:extend(.btn-link);
462 color: @alert2;
464 color: @alert2;
463
465
464 &:hover {
466 &:hover {
465 color: darken(@alert2,30%);
467 color: darken(@alert2,30%);
466 }
468 }
467 }
469 }
468
470
469 &:disabled {
471 &:disabled {
470 color: @alert2;
472 color: @alert2;
471 background-color: white;
473 background-color: white;
472 }
474 }
473 }
475 }
474 &.btn-danger-action {
476 &.btn-danger-action {
475 .border ( @border-thickness, @alert2 );
477 .border ( @border-thickness, @alert2 );
476 background-color: @alert2;
478 background-color: @alert2;
477 color: white;
479 color: white;
478
480
479 a {
481 a {
480 color: white;
482 color: white;
481 }
483 }
482
484
483 &:hover {
485 &:hover {
484 background-color: darken(@alert2,20%);
486 background-color: darken(@alert2,20%);
485 }
487 }
486
488
487 &.active {
489 &.active {
488 .border ( @border-thickness, @alert2 );
490 .border ( @border-thickness, @alert2 );
489 color: white;
491 color: white;
490 background-color: @alert2;
492 background-color: @alert2;
491
493
492 a {
494 a {
493 color: white;
495 color: white;
494 }
496 }
495 }
497 }
496
498
497 &:disabled {
499 &:disabled {
498 background-color: white;
500 background-color: white;
499 color: @alert2;
501 color: @alert2;
500 }
502 }
501 }
503 }
502 }
504 }
503
505
504
506
505 .button-links {
507 .button-links {
506 float: left;
508 float: left;
507 display: inline;
509 display: inline;
508 margin: 0;
510 margin: 0;
509 padding-left: 0;
511 padding-left: 0;
510 list-style: none;
512 list-style: none;
511 text-align: right;
513 text-align: right;
512
514
513 li {
515 li {
514
516
515
517
516 }
518 }
517
519
518 li.active {
520 li.active {
519 background-color: @grey6;
521 background-color: @grey6;
520 .border ( @border-thickness, @grey4 );
522 .border ( @border-thickness, @grey4 );
521 }
523 }
522
524
523 }
525 }
General Comments 0
You need to be logged in to leave comments. Login now