_bootswatch.scss 10.9 KB
Newer Older
Thomas Park's avatar
Thomas Park committed
1
// Paper 3.3.4
Corey Sewell's avatar
Corey Sewell committed
2
3
4
// Bootswatch
// -----------------------------------------------------

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

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

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

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

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

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

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

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

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

@mixin btn($class,$bg){
  .btn-#{$class} {
    background-size: 200%;
    background-position: 50%;

Thomas Park's avatar
Thomas Park committed
44
45
46
47
    &:hover,
    &:active:hover,
    &:focus {
      background-color: darken($bg, 6%);
Corey Sewell's avatar
Corey Sewell committed
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
    }

    &:active {
      background-color: darken($bg, 6%);
      @include gradient-radial(darken($bg, 6%) 10%, $bg 11%);
      background-size: 1000%;
      @include box-shadow(2px 2px 2px rgba(0,0,0,.3));
    }
  }
}

@include btn(default,$btn-default-bg);
@include btn(primary,$btn-primary-bg);
@include btn(success,$btn-success-bg);
@include btn(info,$btn-info-bg);
@include btn(warning,$btn-warning-bg);
@include btn(danger,$btn-danger-bg);

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

  &-link {
    @include 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;
    }
  }
}

Corey Sewell's avatar
Corey Sewell committed
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
// Typography =================================================================

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

p {
  margin: 0 0 1em;
}

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

a {
  @include transition(all 0.2s);
}

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

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

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

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

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

  &[disabled],
  &[readonly] {
    @include 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;
    }
  }
Corey Sewell's avatar
Corey Sewell committed
175
176
177
178
179
180
181
}

select,
select.form-control {
  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;
Corey Sewell's avatar
Corey Sewell committed
190
191
  @include box-shadow(inset 0 -1px 0 #ddd);
  font-size: 16px;
192
  line-height: 1.5;
193
194
195
196

  &::-ms-expand {
    display: none;
  }
Corey Sewell's avatar
Corey Sewell 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;
    }
  }

Corey Sewell's avatar
Corey Sewell committed
208
209
  &:focus {
    @include 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;
Corey Sewell's avatar
Corey Sewell 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%;
    @include transition(240ms);
  }

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

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

  &:checked:before {
    @include 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;
    @include 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;
    @include 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;
  }
}

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

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

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

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

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

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

391
392
  & > li.active > a,
  & > li.active > a:focus {
Corey Sewell's avatar
Corey Sewell committed
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
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
449
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
479
    border: none;
    @include box-shadow(inset 0 -2px 0 $brand-primary);
    color: $brand-primary;

    &:hover {
      border: none;
      color: $brand-primary;
    }
  }

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

  &.nav-justified {

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

  .dropdown-menu {
    margin-top: 0;
  }
}

.dropdown-menu {
  border: none;
  @include 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;
  }

  a:not(.close),
  .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;

  @include box-shadow(none);

  &-bar {
    @include box-shadow(none);

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

    &: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%);
      }
Corey Sewell's avatar
Corey Sewell committed
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
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
    }
    
    &-success:last-child.progress-bar:before {
      background-color: lighten($brand-success, 35%);
    }
    
    &-info:last-child.progress-bar:before {
      background-color: lighten($brand-info, 45%);
    }
    &-warning:last-child.progress-bar:before {
      background-color: lighten($brand-warning, 35%);
    }
    
    &-danger:last-child.progress-bar:before {
      background-color: lighten($brand-danger, 25%);
    }
  }
}

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

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

.close {
  font-size: 34px;
  font-weight: 300;
  line-height: 24px;
  opacity: 0.6;

  &:hover {
    opacity: 1;
  }
}

.list-group {

  &-item {
    padding: 15px;
  }

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

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

.panel {
  border: none;
  border-radius: 2px;
  @include 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;
  @include 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;
    }
  }
}