bootswatch.less 9.96 KB
Newer Older
Thomas Park's avatar
Thomas Park committed
1
// Paper 3.3.2
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
// Bootswatch
// -----------------------------------------------------

@import url("//fonts.googleapis.com/css?family=Roboto:300,400,500");

// 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} {
Corey Sewell's avatar
Corey Sewell committed
41
    #gradient > .radial(@bg 80%, darken(@bg, 6%) 81%);
42
43
44
    background-size: 200%;
    background-position: 50%;
    transition: background-size 2s;
45
46

    &:hover {
47
      background-size: 100%;
Corey Sewell's avatar
Corey Sewell committed
48
      border-color: darken(@bg, 6%);
49
50
51
    }

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

Corey Sewell's avatar
Corey Sewell committed
60
61
62
63
64
65
#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);
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

.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;
  }
}

// Typography =================================================================

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

p {
  margin: 0 0 1em;
}

101
102
input,
button {
103
104
105
106
107
108
109
110
111
112
113
114
115
  -webkit-font-smoothing: antialiased;
  letter-spacing: .1px;
  text-rendering: optimizeLegibility;
}

a {
  .transition(all 0.2s);
}

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

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

116
117
textarea,
textarea.form-control,
118
input.form-control,
119
120
input[type=text],
input[type=password],
121
input[type=email],
122
input[type=number],
123
[type=text].form-control,
124
125
[type=password].form-control,
[type=email].form-control,
126
127
[type=tel].form-control,
[contenteditable].form-control {
128
129
130
  padding: 0;
  border: none;
  border-radius: 0;
131
  -webkit-appearance: none;
132
133
134
135
136
137
138
139
140
141
142
143
  .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;
  }
144
145
146
147
148
149
150
151
152
153

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

    &-lg {
      font-size: @font-size-large;
    }
  }
154
155
156
157
}

select,
select.form-control {
Pascal Herbert's avatar
Pascal Herbert committed
158
159
160
  border: 0;
  border-radius: 0;
  -webkit-appearance: none;
161
162
163
164
165
166
167
168
  -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
169
170
  .box-shadow(inset 0 -1px 0 #ddd);
  font-size: 16px;
171
  line-height: 1.5;
172
173
174
175

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

177
178
179
180
181
182
183
184
185
186
  &.input {
    &-sm {
      font-size: @font-size-small;
    }

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

Pascal Herbert's avatar
Pascal Herbert committed
187
188
  &:focus {
    .box-shadow(inset 0 -2px 0 @brand-primary);
189
190
191
192
193
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAAJ1BMVEUhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISF8S9ewAAAADHRSTlMAAgMJC0uWpKa6wMxMdjkoAAAANUlEQVR4AeXJyQEAERAAsNl7Hf3X6xt0QL6JpZWq30pdvdadme+0PMdzvHm8YThHcT1H7K0BtOMDniZhWOgAAAAASUVORK5CYII=);
  }

  &[multiple] {
    background: none;
Pascal Herbert's avatar
Pascal Herbert committed
194
  }
195
196
}

197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
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
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
.radio,
.radio-inline,
.checkbox,
.checkbox-inline {
  label {
    padding-left: 25px;
  }
}

input[type="radio"],
.radio input[type="radio"],
.radio-inline input[type="radio"] {
  margin-top: 5px;
  margin-left: -25px;
  border: none;
  background-color: transparent;
  -webkit-appearance: none;
  appearance: none;

  &: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"] {
  margin-left: -25px;
  border: none;
  -webkit-appearance: none;
  appearance: none;

  &: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 {
    content: "";
    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;
  }
}

314
315
316
317
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
.has-warning {
  input,
  .form-control,
  input:focus,
  .form-control:focus {
    .box-shadow(inset 0 -2px 0 @brand-warning);
  }
}

.has-error {
  input,
  .form-control,
  input:focus,
  .form-control:focus {
    .box-shadow(inset 0 -2px 0 @brand-danger);
  }
}

.has-success {
  input,
  .form-control,
  input:focus,
  .form-control:focus {
    .box-shadow(inset 0 -2px 0 @brand-success);
  }
}

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

.nav-tabs {
344
345
  > li > a,
  > li > a:focus {
346
    margin-right: 0;
347
348
    background-color: transparent;
    border: none;
349
350
351
352
353
354
355
356
357
358
359
    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;
    }
  }

360
361
  & > li.active > a,
  & > li.active > a:focus {
362
363
364
365
366
367
    border: none;
    .box-shadow(inset 0 -2px 0 @brand-primary);
    color: @brand-primary;

    &:hover {
      border: none;
368
      color: @brand-primary;
369
370
371
372
373
374
375
    }
  }

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

376
377
378
379
380
381
382
383
384
385
  &.nav-justified {

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

386
387
388
389
390
391
392
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
  .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;
  }

418
  a:not(.close),
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
  .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
448
449
450
451
452
453
454
455
456
457
458
459
    &:last-child {
        &:before {
          display: block;
          content: 'div::before';
          position: absolute;
          width: 100%;
          height: 100%;
          left: 0;
          right: 0;
          z-index: -1;
          background-color: lighten(@progress-bar-bg, 35%);
        }
460
    }
Corey Sewell's avatar
Corey Sewell committed
461
462
    
    &-success:last-child.progress-bar:before {
463
464
      background-color: lighten(@brand-success, 35%);
    }
Corey Sewell's avatar
Corey Sewell committed
465
466
    
    &-info:last-child.progress-bar:before {
467
468
      background-color: lighten(@brand-info, 45%);
    }
Corey Sewell's avatar
Corey Sewell committed
469
    &-warning:last-child.progress-bar:before {
470
471
      background-color: lighten(@brand-warning, 35%);
    }
Corey Sewell's avatar
Corey Sewell committed
472
473
    
    &-danger:last-child.progress-bar:before {
474
475
476
477
478
479
480
481
482
483
484
485
      background-color: lighten(@brand-danger, 25%);
    }
  }
}

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

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

.close {
  font-size: 34px;
  font-weight: 300;
486
  line-height: 24px;
487
488
489
490
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
  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));
}