bootswatch.less 10.5 KB
Newer Older
Thomas Park's avatar
Thomas Park committed
1
// Paper 3.3.4
2
3
4
// Bootswatch
// -----------------------------------------------------

5
@import url("//fonts.googleapis.com/css?family=Roboto:300,400,500,700");
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

// Navbar =====================================================================

.navbar {
  border: none;
  .box-shadow(0 1px 2px rgba(0,0,0,.3));

  &-brand {
    font-size: 24px;
  }

  &-inverse {
    .form-control {
      color: #fff;
      .placeholder(@navbar-inverse-link-color);

      &[type=text] {
        .box-shadow(inset 0 -1px 0 @navbar-inverse-link-color);

        &:focus {
          .box-shadow(inset 0 -2px 0 #fff);
        }
      }
    }
  }

  &-nav > li > .dropdown-menu {
    margin-top: 2px;
  }
}

// Buttons ====================================================================

Corey Sewell's avatar
Corey Sewell committed
39
#btn(@class,@bg) {
40
  .btn-@{class} {
41
42
    background-size: 200%;
    background-position: 50%;
43

Thomas Park's avatar
Thomas Park committed
44
45
46
47
    &:hover,
    &:active:hover,
    &:focus {
      background-color: darken(@bg, 6%);
48
49
50
    }

    &:active {
Corey Sewell's avatar
Corey Sewell committed
51
52
      background-color: darken(@bg, 6%);
      #gradient > .radial(darken(@bg, 6%) 10%, @bg 11%);
53
      background-size: 1000%;
54
55
56
57
58
      .box-shadow(2px 2px 2px rgba(0,0,0,.3));
    }
  }
}

Corey Sewell's avatar
Corey Sewell committed
59
60
61
62
63
64
#btn(default,@btn-default-bg);
#btn(primary,@btn-primary-bg);
#btn(success,@btn-success-bg);
#btn(info,@btn-info-bg);
#btn(warning,@btn-warning-bg);
#btn(danger,@btn-danger-bg);
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87

.btn {
  text-transform: uppercase;
  border-right: none;
  border-bottom: none;
  .box-shadow(1px 1px 2px rgba(0,0,0,.3));
  .transition(all 0.2s);

  &-link {
    .box-shadow(none);

    &:hover,
    &:focus {
      color: @brand-primary;
      text-decoration: none;
    }
  }

  &-default.disabled {
    border: 1px solid @btn-default-border;
  }
}

88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
.btn-group {
  .btn + .btn,
  .btn + .btn-group,
  .btn-group + .btn,
  .btn-group + .btn-group {
    margin-left: 0;
  }

  &-vertical {
    > .btn + .btn,
    > .btn + .btn-group,
    > .btn-group + .btn,
    > .btn-group + .btn-group {
      margin-top: 0;
    }
  }
}

106
107
108
109
110
111
112
113
114
115
116
117
// Typography =================================================================

body {
  -webkit-font-smoothing: antialiased;
  letter-spacing: .1px;
  text-rendering: optimizeLegibility;
}

p {
  margin: 0 0 1em;
}

118
119
input,
button {
120
121
122
123
124
125
126
127
128
129
130
131
132
  -webkit-font-smoothing: antialiased;
  letter-spacing: .1px;
  text-rendering: optimizeLegibility;
}

a {
  .transition(all 0.2s);
}

// Tables =====================================================================

// Forms ======================================================================

Thomas Park's avatar
Thomas Park committed
133
134
135
136
label {
  font-weight: normal;
}

137
138
textarea,
textarea.form-control,
139
input.form-control,
140
141
input[type=text],
input[type=password],
142
input[type=email],
143
input[type=number],
144
[type=text].form-control,
145
146
[type=password].form-control,
[type=email].form-control,
147
148
[type=tel].form-control,
[contenteditable].form-control {
149
150
151
  padding: 0;
  border: none;
  border-radius: 0;
152
  -webkit-appearance: none;
153
154
155
156
157
158
159
160
161
162
163
164
  .box-shadow(inset 0 -1px 0 #ddd);
  font-size: 16px;

  &:focus {
    .box-shadow(inset 0 -2px 0 @brand-primary);
  }

  &[disabled],
  &[readonly] {
    .box-shadow(none);
    border-bottom: 1px dotted #ddd;
  }
165
166
167
168
169
170
171
172
173
174

  &.input {
    &-sm {
      font-size: @font-size-small;
    }

    &-lg {
      font-size: @font-size-large;
    }
  }
175
176
177
178
}

select,
select.form-control {
Pascal Herbert's avatar
Pascal Herbert committed
179
180
181
  border: 0;
  border-radius: 0;
  -webkit-appearance: none;
182
183
184
185
186
187
188
189
  -moz-appearance: none;
  appearance: none;
  padding-left: 0;
  padding-right: 0\9; // remove padding for < ie9 since default arrow can't be removed
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAAJ1BMVEVmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmaP/QSjAAAADHRSTlMAAgMJC0uWpKa6wMxMdjkoAAAANUlEQVR4AeXJyQEAERAAsNl7Hf3X6xt0QL6JpZWq30pdvdadme+0PMdzvHm8YThHcT1H7K0BtOMDniZhWOgAAAAASUVORK5CYII=);
  background-size: 13px;
  background-repeat: no-repeat;
  background-position: right center;
Pascal Herbert's avatar
Pascal Herbert committed
190
191
  .box-shadow(inset 0 -1px 0 #ddd);
  font-size: 16px;
192
  line-height: 1.5;
193
194
195
196

  &::-ms-expand {
    display: none;
  }
Pascal Herbert's avatar
Pascal Herbert committed
197

198
199
200
201
202
203
204
205
206
207
  &.input {
    &-sm {
      font-size: @font-size-small;
    }

    &-lg {
      font-size: @font-size-large;
    }
  }

Pascal Herbert's avatar
Pascal Herbert committed
208
209
  &:focus {
    .box-shadow(inset 0 -2px 0 @brand-primary);
210
211
212
213
214
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAAJ1BMVEUhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISF8S9ewAAAADHRSTlMAAgMJC0uWpKa6wMxMdjkoAAAANUlEQVR4AeXJyQEAERAAsNl7Hf3X6xt0QL6JpZWq30pdvdadme+0PMdzvHm8YThHcT1H7K0BtOMDniZhWOgAAAAASUVORK5CYII=);
  }

  &[multiple] {
    background: none;
Pascal Herbert's avatar
Pascal Herbert committed
215
  }
216
217
}

218
219
220
221
222
223
224
.radio,
.radio-inline,
.checkbox,
.checkbox-inline {
  label {
    padding-left: 25px;
  }
225
226
227
228
229

  input[type="radio"],
  input[type="checkbox"] {
    margin-left: -25px;
  }
230
231
232
233
234
}

input[type="radio"],
.radio input[type="radio"],
.radio-inline input[type="radio"] {
235
  position: relative;
236
  margin-top: 5px;
237
238
  margin-right: 4px;
  vertical-align: -4px;
239
240
241
242
  border: none;
  background-color: transparent;
  -webkit-appearance: none;
  appearance: none;
243
  cursor: pointer;
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292

  &:focus {
    outline: none;
  }

  &:before,
  &:after {
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    margin-top: -3px;
    border-radius: 50%;
    .transition(240ms);
  }

  &:before {
    position: absolute;
    left: 0;
    top: 0;
    background-color: @brand-primary;
    .scale(0);
  }

  &:after {
    border: 2px solid @gray;
  }

  &:checked:before {
    .scale(0.5);
  }

  &:disabled:checked:before {
    background-color: @gray-light;
  }

  &:checked:after {
    border-color: @brand-primary;
  }

  &:disabled:after,
  &:disabled:checked:after {
    border-color: @gray-light;
  }
}

input[type="checkbox"],
.checkbox input[type="checkbox"],
.checkbox-inline input[type="checkbox"] {
293
294
  position: relative;
  vertical-align: -4px;
295
296
297
  border: none;
  -webkit-appearance: none;
  appearance: none;
298
  cursor: pointer;
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316

  &:focus {
    outline: none;
  }

  &:after {
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    margin-top: -2px;
    margin-right: 5px;
    border: 2px solid @gray;
    border-radius: 2px;
    .transition(240ms);
  }

  &:checked:before {
317
    content: "";
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
    position: absolute;
    top: 0;
    left: 6px;
    display: table;
    width: 6px;
    height: 12px;
    border: 2px solid #fff;
    border-top-width: 0;
    border-left-width: 0;
    .rotate(45deg);
  }

  &:checked:after {
    background-color: @brand-primary;
    border-color: @brand-primary;
  }

  &:disabled:after {
    border-color: @gray-light;
  }

  &:disabled:checked:after {
    background-color: @gray-light;
    border-color: transparent;
  }
}

345
.has-warning {
346
  input:not([type=checkbox]),
347
  .form-control,
348
  input:not([type=checkbox]):focus,
349
350
351
352
353
354
  .form-control:focus {
    .box-shadow(inset 0 -2px 0 @brand-warning);
  }
}

.has-error {
355
  input:not([type=checkbox]),
356
  .form-control,
357
  input:not([type=checkbox]):focus,
358
359
360
361
362
363
  .form-control:focus {
    .box-shadow(inset 0 -2px 0 @brand-danger);
  }
}

.has-success {
364
  input:not([type=checkbox]),
365
  .form-control,
366
  input:not([type=checkbox]):focus,
367
368
369
370
371
372
373
374
  .form-control:focus {
    .box-shadow(inset 0 -2px 0 @brand-success);
  }
}

// Navs =======================================================================

.nav-tabs {
375
376
  > li > a,
  > li > a:focus {
377
    margin-right: 0;
378
379
    background-color: transparent;
    border: none;
380
381
382
383
384
385
386
387
388
389
390
    color: @navbar-default-link-color;
    .box-shadow(inset 0 -1px 0 #ddd);
    .transition(all 0.2s);

    &:hover {
      background-color: transparent;
      .box-shadow(inset 0 -2px 0 @brand-primary);
      color: @brand-primary;
    }
  }

391
392
  & > li.active > a,
  & > li.active > a:focus {
393
394
395
396
397
398
    border: none;
    .box-shadow(inset 0 -2px 0 @brand-primary);
    color: @brand-primary;

    &:hover {
      border: none;
399
      color: @brand-primary;
400
401
402
403
404
405
406
    }
  }

  & > li.disabled > a {
    .box-shadow(inset 0 -1px 0 #ddd);
  }

407
408
409
410
411
412
413
414
415
416
  &.nav-justified {

    & > li > a,
    & > li > a:hover,
    & > .active > a,
    & > .active > a:hover {
      border: none;
    }
  }

417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
  .dropdown-menu {
    margin-top: 0;
  }
}

.dropdown-menu {
  border: none;
  .box-shadow(0 1px 4px rgba(0,0,0,.3));
}

// Indicators =================================================================

.alert {
  border: none;
  color: #fff;

  &-success {
    background-color: @brand-success;
  }

  &-info {
    background-color: @brand-info;
  }

  &-warning {
    background-color: @brand-warning;
  }

  &-danger {
    background-color: @brand-danger;
  }

449
  a:not(.close),
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
  .alert-link {
    color: #fff;
    font-weight: bold;
  }

  .close {
    color: #fff;
  }
}

.badge {
  padding: 3px 6px 5px;
}

.progress {
  position: relative;
  z-index: 1;
  height: 6px;
  border-radius: 0;

  .box-shadow(none);

  &-bar {
    .box-shadow(none);

    &:last-child {
      border-radius: 0 3px 3px 0;
    }

Corey Sewell's avatar
Corey Sewell committed
479
    &:last-child {
480
481
      &:before {
        display: block;
482
        content: "";
483
484
485
486
487
488
489
490
        position: absolute;
        width: 100%;
        height: 100%;
        left: 0;
        right: 0;
        z-index: -1;
        background-color: lighten(@progress-bar-bg, 35%);
      }
491
    }
Corey Sewell's avatar
Corey Sewell committed
492
493
    
    &-success:last-child.progress-bar:before {
494
495
      background-color: lighten(@brand-success, 35%);
    }
Corey Sewell's avatar
Corey Sewell committed
496
497
    
    &-info:last-child.progress-bar:before {
498
499
      background-color: lighten(@brand-info, 45%);
    }
Corey Sewell's avatar
Corey Sewell committed
500
    &-warning:last-child.progress-bar:before {
501
502
      background-color: lighten(@brand-warning, 35%);
    }
Corey Sewell's avatar
Corey Sewell committed
503
504
    
    &-danger:last-child.progress-bar:before {
505
506
507
508
509
510
511
512
513
514
515
516
      background-color: lighten(@brand-danger, 25%);
    }
  }
}

// Progress bars ==============================================================

// Containers =================================================================

.close {
  font-size: 34px;
  font-weight: 300;
517
  line-height: 24px;
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
  opacity: 0.6;

  &:hover {
    opacity: 1;
  }
}

.list-group {

  &-item {
    padding: 15px;
  }

  &-item-text {
    color: @gray-light;
  }
}

.well {
  border-radius: 0;
  .box-shadow(none);
}

.panel {
  border: none;
  border-radius: 2px;
  .box-shadow(0 1px 4px rgba(0,0,0,.3));

  &-heading {
    border-bottom: none;
  }

  &-footer {
    border-top: none;
  }

  &-success {
    .panel-heading {
      background-color: @brand-success;
    }

    .panel-title {
      color: #fff;
    }
  }

  &-info {
    .panel-heading {
      background-color: @brand-info;
    }

    .panel-title {
      color: #fff;
    }
  }

  &-warning {
    .panel-heading {
      background-color: @brand-warning;
    }

    .panel-title {
      color: #fff;
    }
  }

  &-danger {
    .panel-heading {
      background-color: @brand-danger;
    }

    .panel-title {
      color: #fff;
    }
  }
}

.popover {
  border: none;
  .box-shadow(0 1px 4px rgba(0,0,0,.3));
}
599
600
601
602
603
604
605
606
607

.carousel {
  &-caption {
    h1, h2, h3, h4, h5, h6 {
      color: inherit;
    }
  }
}