patterns.less 19.1 KB
Newer Older
1
/* Patterns.less
2
 * Repeatable UI elements outside the base styles provided from the scaffolding
3
 * ---------------------------------------------------------------------------- */
Jacob Thornton's avatar
Jacob Thornton committed
4

5
6

// TOPBAR
7
// ------
Jacob Thornton's avatar
Jacob Thornton committed
8
9

// Topbar for Branding and Nav
10
.topbar {
Jacob Thornton's avatar
Jacob Thornton committed
11
12
13
14
15
  height: 40px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
Mark Otto's avatar
Mark Otto committed
16
  z-index: 10000;
Jacob Thornton's avatar
Jacob Thornton committed
17
  overflow: visible;
18

Jacob Thornton's avatar
Jacob Thornton committed
19
20
  // Links get text shadow
  a {
21
    color: @grayLight;
Jacob Thornton's avatar
Jacob Thornton committed
22
23
    text-shadow: 0 -1px 0 rgba(0,0,0,.25);
  }
24

25
26
  // Hover and active states
  a:hover,
27
  ul .active > a {
Jacob Thornton's avatar
Jacob Thornton committed
28
    background-color: #333;
29
    background-color: rgba(255,255,255,.05);
Jacob Thornton's avatar
Jacob Thornton committed
30
31
32
    color: @white;
    text-decoration: none;
  }
33

34
  // Website name
35
  // h3 left for backwards compatibility
36
  h3 {
37
    position: relative;
38
39
40
41
42
43
44
45
46
47
48
  }
  h3 a,
  .brand {
    float: left;
    display: block;
    padding: 8px 20px 12px;
    margin-left: -20px; // negative indent to left-align the text down the page
    color: @white;
    font-size: 20px;
    font-weight: 200;
    line-height: 1;
Jacob Thornton's avatar
Jacob Thornton committed
49
  }
50

51
52
53
54
  // Plain text in topbar
  p {
    margin: 0;
    line-height: 40px;
55
56
57
    a:hover {
      background-color: transparent;
    }
58
59
  }

Jacob Thornton's avatar
Jacob Thornton committed
60
61
62
  // Search Form
  form {
    float: left;
Mark Otto's avatar
Mark Otto committed
63
    margin: 5px 0 0 0;
Jacob Thornton's avatar
Jacob Thornton committed
64
    position: relative;
65
    .opacity(100);
66
  }
Mark Otto's avatar
Mark Otto committed
67
68
69
70
  // Todo: remove from v2.0 when ready, added for legacy
  form.pull-right {
    float: right;
  }
71
72
73
74
75
76
77
78
79
80
81
82
  input {
    background-color: #444;
    background-color: rgba(255,255,255,.3);
    #font > .sans-serif(13px, normal, 1);
    padding: 4px 9px;
    color: #fff;
    color: rgba(255,255,255,.75);
    border: 1px solid #111;
    .border-radius(4px);
    @shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px rgba(255,255,255,.25);
    .box-shadow(@shadow);
    .transition(none);
83

84
85
86
87
88
89
90
91
92
93
94
    // Placeholder text gets special styles; can't be bundled together though for some reason
    &:-moz-placeholder {
      color: @grayLighter;
    }
    &::-webkit-input-placeholder {
      color: @grayLighter;
    }
    // Hover states
    &:hover {
      background-color: @grayLight;
      background-color: rgba(255,255,255,.5);
Jacob Thornton's avatar
Jacob Thornton committed
95
      color: #fff;
96
97
98
99
100
101
102
103
104
105
106
    }
    // Focus states (we use .focused since IE8 and down doesn't support :focus)
    &:focus,
    &.focused {
      outline: none;
      background-color: #fff;
      color: @grayDark;
      text-shadow: 0 1px 0 #fff;
      border: 0;
      padding: 5px 10px;
      .box-shadow(0 0 3px rgba(0,0,0,.15));
Jacob Thornton's avatar
Jacob Thornton committed
107
108
    }
  }
109
}
110

111
// gradient is applied to it's own element because overflow visible is not honored by ie when filter is present
112
// For backwards compatibility, include .topbar .fill
113
.topbar-inner,
Mark Otto's avatar
Mark Otto committed
114
.topbar .fill {
115
116
117
118
119
120
  background-color: #222;
  #gradient > .vertical(#333, #222);
  @shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1);
  .box-shadow(@shadow);
}

121
122
123

// NAVIGATION
// ----------
124
125

// Topbar Nav
126
// ul.nav for all topbar based navigation to avoid inheritance issues and over-specificity
127
128
// For backwards compatibility, leave in .topbar div > ul
.topbar div > ul,
129
130
131
132
133
134
.nav {
  display: block;
  float: left;
  margin: 0 10px 0 0;
  position: relative;
  left: 0;
135
  > li {
Jacob Thornton's avatar
Jacob Thornton committed
136
137
    display: block;
    float: left;
138
139
140
141
142
143
144
145
146
  }
  a {
    display: block;
    float: none;
    padding: 10px 10px 11px;
    line-height: 19px;
    text-decoration: none;
    &:hover {
      color: #fff;
147
148
149
      text-decoration: none;
    }
  }
150
  .active > a {
151
152
153
    background-color: #222;
    background-color: rgba(0,0,0,.5);
  }
154

155
156
157
158
159
  // Secondary (floated right) nav in topbar
  &.secondary-nav {
    float: right;
    margin-left: 10px;
    margin-right: 0;
160
161
    // backwards compatibility
    .menu-dropdown,
162
    .dropdown-menu {
163
      right: 0;
164
      border: 0;
165
166
    }
  }
167
  // Dropdowns within the .nav
168
169
170
  // a.menu:hover and li.open .menu for backwards compatibility
  a.menu:hover,
  li.open .menu,
171
172
  .dropdown-toggle:hover,
  .dropdown.open .dropdown-toggle {
173
174
    background: #444;
    background: rgba(255,255,255,.05);
175
  }
176
177
  // .menu-dropdown for backwards compatibility
  .menu-dropdown,
178
179
  .dropdown-menu {
    background-color: #333;
180
181
    // a.menu for backwards compatibility
    a.menu,
182
183
184
    .dropdown-toggle {
      color: #fff;
      &.open {
185
186
        background: #444;
        background: rgba(255,255,255,.05);
Jacob Thornton's avatar
Jacob Thornton committed
187
      }
188
189
190
191
    }
    li a {
      color: #999;
      text-shadow: 0 1px 0 rgba(0,0,0,.5);
Jacob Thornton's avatar
Jacob Thornton committed
192
      &:hover {
193
        #gradient > .vertical(#292929,#191919);
Jacob Thornton's avatar
Jacob Thornton committed
194
195
        color: #fff;
      }
196
    }
197
198
199
    .active a {
      color: #fff;
    }
200
201
202
    .divider {
      background-color: #222;
      border-color: #444;
Jacob Thornton's avatar
Jacob Thornton committed
203
204
    }
  }
205
}
206

207
// For backwards compatibility with new dropdowns, redeclare dropdown link padding
208
209
210
211
212
.topbar ul .menu-dropdown li a,
.topbar ul .dropdown-menu li a {
  padding: 4px 15px;
}

213
214
// Dropdown Menus
// Use the .menu class on any <li> element within the topbar or ul.tabs and you'll get some superfancy dropdowns
215
216
// li.menu for backwards compatibility
li.menu,
217
218
219
220
.dropdown {
  position: relative;
}
// The link that is clicked to toggle the dropdown
221
222
// a.menu for backwards compatibility
a.menu:after,
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
.dropdown-toggle:after {
  width: 0;
  height: 0;
  display: inline-block;
  content: "&darr;";
  text-indent: -99999px;
  vertical-align: top;
  margin-top: 8px;
  margin-left: 4px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid #fff;
  .opacity(50);
}
// The dropdown menu (ul)
238
239
// .menu-dropdown for backwards compatibility
.menu-dropdown,
240
241
242
243
244
245
.dropdown-menu {
  background-color: #fff;
  float: left;
  display: none; // None by default, but block on "open" of the menu
  position: absolute;
  top: 40px;
246
  z-index: 900;
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
  min-width: 160px;
  max-width: 220px;
  _width: 160px;
  margin-left: 0; // override default ul styles
  margin-right: 0;
  padding: 6px 0;
  zoom: 1; // do we need this?
  border-color: #999;
  border-color: rgba(0,0,0,.2);
  border-style: solid;
  border-width: 0 1px 1px;
  .border-radius(0 0 6px 6px);
  .box-shadow(0 2px 4px rgba(0,0,0,.2));
  .background-clip(padding-box);

  // Unfloat any li's to make them stack
  li {
    float: none;
Jacob Thornton's avatar
Jacob Thornton committed
265
    display: block;
266
    background-color: none;
267
  }
Jacob Thornton's avatar
Jacob Thornton committed
268
269
270
271
272
273
274
275
276
277
278
  // Dividers (basically an hr) within the dropdown
  .divider {
    height: 1px;
    margin: 5px 0;
    overflow: hidden;
    background-color: #eee;
    border-bottom: 1px solid #fff;
  }
}

.topbar .dropdown-menu, .dropdown-menu {
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
  // Links within the dropdown menu
  a {
    display: block;
    padding: 4px 15px;
    clear: both;
    font-weight: normal;
    line-height: 18px;
    color: @gray;
    text-shadow: 0 1px 0 #fff;
    // Hover state
    &:hover {
      #gradient > .vertical(#eeeeee, #dddddd);
      color: @grayDark;
      text-decoration: none;
      @shadow: inset 0 1px 0 rgba(0,0,0,.025), inset 0 -1px rgba(0,0,0,.025);
      .box-shadow(@shadow);
Jacob Thornton's avatar
Jacob Thornton committed
295
    }
296
297
  }
}
Jacob Thornton's avatar
Jacob Thornton committed
298

299
// Open state for the dropdown
300
301
// .open for backwards compatibility
.open,
302
.dropdown.open {
303
304
  // .menu for backwards compatibility
  .menu,
305
306
  .dropdown-toggle {
    color: #fff;
307
308
    background: #ccc;
    background: rgba(0,0,0,.3);
309
  }
310
311
  // .menu-dropdown for backwards compatibility
  .menu-dropdown,
312
313
314
315
316
  .dropdown-menu {
    display: block;
  }
}

317

318
319
320
321
322
323
324
325
326
327
// Tabs and Pills
.tabs,
.pills {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  .clearfix();
  > li {
    float: left;
    > a {
Jacob Thornton's avatar
Jacob Thornton committed
328
329
      display: block;
    }
330
331
  }
}
332

333
334
// Basic Tabs
.tabs {
335
  float: left;
336
337
338
339
  width: 100%;
  border-bottom: 1px solid #ddd;
  > li {
    position: relative; // For the dropdowns mostly
340
    top: 1px;
341
342
343
344
345
346
347
348
349
    > a {
      margin-right: 2px;
      padding: 0 15px;
      line-height: (@baseline * 2) - 1;
      .border-radius(4px 4px 0 0);
      &:hover {
        background-color: #eee;
        border-bottom: 1px solid #ddd;
        text-decoration: none;
Jacob Thornton's avatar
Jacob Thornton committed
350
351
      }
    }
352
353
354
355
356
357
358
359
    &.active > a {
      background-color: #fff;
      padding: 0 14px;
      border: 1px solid #ddd;
      border-bottom: 0;
      color: @gray;
    }
  }
360
361
  // first one for backwards compatibility
  .menu-dropdown,
362
363
364
365
366
  .dropdown-menu {
    top: 35px;
    border-width: 1px;
    .border-radius(0 6px 6px 6px);
  }
367
368
  // first one for backwards compatibility
  a.menu:after,
369
370
371
372
373
  .dropdown-toggle:after {
    border-top-color: #999;
    margin-top: 15px;
    margin-left: 5px;
  }
374
  // first one for backwards compatibility
375
376
377
378
379
  li.open.menu .menu,
  .open.dropdown .dropdown-toggle {
    border-color: #999;
  }
  // first one for backwards compatibility
380
  li.open a.menu:after,
381
382
383
384
385
386
387
  .dropdown.open .dropdown-toggle:after {
    border-top-color: #555;
  }
}

// Basic pill nav
.pills {
388
  a {
389
      margin: 5px 3px 5px 0;
390
391
392
393
394
395
    padding: 0 15px;
    text-shadow: 0 1px 1px #fff;
    line-height: 30px;
    .border-radius(15px);
    &:hover {
      background: @linkColorHover;
396
      color: #fff;
397
      text-decoration: none;
398
      text-shadow: 0 1px 1px rgba(0,0,0,.25);
Jacob Thornton's avatar
Jacob Thornton committed
399
400
    }
  }
401
402
403
404
405
  .active a {
    background: @linkColor;
    color: #fff;
    text-shadow: 0 1px 1px rgba(0,0,0,.25);
  }
Jacob Thornton's avatar
Jacob Thornton committed
406
407
}

408
409
410
411
412
413
414
415
416
417
.tab-content > *,
.pill-content > * {
  display: none;
}

.tab-content > .active,
.pill-content > .active {
  display:block;
}

418

Mark Otto's avatar
Mark Otto committed
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
// BREADCRUMBS
// -----------

.breadcrumb {
  margin: 0 0 @baseline;
  padding: 7px 14px;
  #gradient > .vertical(#ffffff, #f5f5f5);
  border: 1px solid #ddd;
  .border-radius(3px);
  .box-shadow(inset 0 1px 0 #fff);
  li {
    display: inline;
    text-shadow: 0 1px 0 #fff;
  }
  .divider {
    padding: 0 5px;
    color: @grayLight;
  }
  a {
  }
  .active a {
    color: @grayDark;
  }
}


445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
// PAGE HEADERS
// ------------

.hero-unit {
  background-color: #f5f5f5;
  margin-bottom: 30px;
  padding: 60px;
  .border-radius(6px);
  h1 {
    margin-bottom: 0;
    font-size: 60px;
    line-height: 1;
    letter-spacing: -1px;
  }
  p {
    font-size: 18px;
    font-weight: 200;
    line-height: @baseline * 1.5;
  }
}
465
466
467
468
469
footer {
  margin-top: @baseline - 1;
  padding-top: @baseline - 1;
  border-top: 1px solid #eee;
}
470

471

472
// PAGE HEADERS
473
// ------------
Jacob Thornton's avatar
Jacob Thornton committed
474

475
.page-header {
Jacob Thornton's avatar
Jacob Thornton committed
476
477
478
479
  margin-bottom: @baseline - 1;
  border-bottom: 1px solid #ddd;
  .box-shadow(0 1px 0 rgba(255,255,255,.5));
  h1 {
480
    margin-bottom: (@baseline / 2) - 1px;
Jacob Thornton's avatar
Jacob Thornton committed
481
482
483
  }
}

484

485
486
// BUTTON STYLES
// -------------
Jacob Thornton's avatar
Jacob Thornton committed
487

488
489
490
491
492
// Base .btn styles
.btn {
  // Button Base
  cursor: pointer;
  display: inline-block;
Mark Otto's avatar
Mark Otto committed
493
  #gradient > .vertical-three-colors(#ffffff, #ffffff, 25%, darken(#ffffff, 10%)); // Don't use .gradientbar() here since it does a three-color gradient
494
495
496
  padding: 5px 14px 6px;
  text-shadow: 0 1px 1px rgba(255,255,255,.75);
  color: #333;
Mark Otto's avatar
Mark Otto committed
497
  font-size: @basefont;
498
499
500
501
502
503
504
505
506
507
508
509
510
  line-height: normal;
  border: 1px solid #ccc;
  border-bottom-color: #bbb;
  .border-radius(4px);
  @shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
  .box-shadow(@shadow);

  &:hover {
    background-position: 0 -15px;
    color: #333;
    text-decoration: none;
  }

Mark Otto's avatar
Mark Otto committed
511
512
513
514
515
  // Focus state for keyboard and accessibility
  &:focus {
    outline: 1px dotted #666;
  }

Jacob Thornton's avatar
Jacob Thornton committed
516
517
518
519
520
521
  // Primary Button Type
  &.primary {
    color:#fff;
    .gradientBar(@blue, @blueDark)
  }

522
523
524
525
   // Transitions
  .transition(.1s linear all);

  // Active and Disabled states
526
527
528
529
  &:active {
    @shadow: inset 0 2px 4px rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.05);
    .box-shadow(@shadow);
  }
530
531
532
  &.disabled {
    cursor: default;
    background-image: none;
533
    .reset-filter();
534
    .opacity(65);
535
    .box-shadow(none);
536
  }
537
  &[disabled] {
538
539
540
541
    // disabled pseudo can't be included with .disabled
    // def because IE8 and below will drop it ;_;
    cursor: default;
    background-image: none;
542
    .reset-filter();
543
    .opacity(65);
544
    .box-shadow(none);
545
546
547
548
  }

  // Button Sizes
  &.large {
Mark Otto's avatar
Mark Otto committed
549
    font-size: @basefont + 2px;
550
551
552
553
554
555
    line-height: normal;
    padding: 9px 14px 9px;
    .border-radius(6px);
  }
  &.small {
    padding: 7px 9px 7px;
Mark Otto's avatar
Mark Otto committed
556
    font-size: @basefont - 2px;
557
558
  }
}
559
560
561
562
// Super jank hack for removing border-radius from IE9 so we can keep filter gradients on alerts and buttons
:root .alert-message,
:root .btn {
  border-radius: 0 \0;
563
564
565
566
567
568
569
570
571
}

// Help Firefox not be a jerk about adding extra padding to buttons
button.btn,
input[type=submit].btn {
  &::-moz-focus-inner {
  	padding: 0;
  	border: 0;
  }
572
573
}

574

575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
// CLOSE ICONS
// -----------
.close {
  float: right;
  color: @black;
  font-size: 20px;
  font-weight: bold;
  line-height: @baseline * .75;
  text-shadow: 0 1px 0 rgba(255,255,255,1);
  .opacity(20);
  &:hover {
    color: @black;
    text-decoration: none;
    .opacity(40);
  }
}


593
// ERROR STYLES
594
// ------------
Jacob Thornton's avatar
Jacob Thornton committed
595

596
// Base alert styles
597
.alert-message {
598
599
  position: relative;
  padding: 7px 15px;
Jacob Thornton's avatar
Jacob Thornton committed
600
  margin-bottom: @baseline;
601
  color: @grayDark;
602
  .gradientBar(#fceec1, #eedc94); // warning by default
603
604
605
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
  border-width: 1px;
  border-style: solid;
606
  .border-radius(4px);
607
  .box-shadow(inset 0 1px 0 rgba(255,255,255,.25));
608

609
610
611
612
  // Remove extra margin from content
  h5 {
    line-height: @baseline;
  }
Jacob Thornton's avatar
Jacob Thornton committed
613
614
615
  p {
    margin-bottom: 0;
  }
616
617
618
619
  div {
    margin-top: 5px;
    margin-bottom: 2px;
    line-height: 28px;
Jacob Thornton's avatar
Jacob Thornton committed
620
  }
621
  .btn {
622
    // Provide actions with buttons
623
    .box-shadow(0 1px 0 rgba(255,255,255,.25));
Jacob Thornton's avatar
Jacob Thornton committed
624
625
  }

626
  &.block-message {
627
628
    background-image: none;
    background-color: lighten(#fceec1, 5%);
629
    .reset-filter();
630
631
632
    padding: 14px;
    border-color: #fceec1;
    .box-shadow(none);
633
    ul, p {
634
635
      margin-right: 30px;
    }
636
637
638
639
640
641
    ul {
      margin-bottom: 0;
    }
    li {
      color: @grayDark;
    }
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
    .alert-actions {
      margin-top: 5px;
    }
    &.error,
    &.success,
    &.info {
      color: @grayDark;
      text-shadow: 0 1px 0 rgba(255,255,255,.5);
    }
    &.error {
      background-color: lighten(#f56a66, 25%);
      border-color: lighten(#f56a66, 20%);
    }
    &.success {
      background-color: lighten(#62c462, 30%);
      border-color: lighten(#62c462, 25%);
    }
    &.info {
      background-color: lighten(#6bd0ee, 25%);
      border-color: lighten(#6bd0ee, 20%);
    }
Jacob Thornton's avatar
Jacob Thornton committed
663
664
665
666
  }
}


667
668
// PAGINATION
// ----------
Jacob Thornton's avatar
Jacob Thornton committed
669

670
.pagination {
Jacob Thornton's avatar
Jacob Thornton committed
671
672
673
674
675
  height: @baseline * 2;
  margin: @baseline 0;
  ul {
    float: left;
    margin: 0;
676
    border: 1px solid #ddd;
Jacob Thornton's avatar
Jacob Thornton committed
677
678
    border: 1px solid rgba(0,0,0,.15);
    .border-radius(3px);
679
    .box-shadow(0 1px 2px rgba(0,0,0,.05));
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
  }
  li {
    display: inline;
  }
  a {
    float: left;
    padding: 0 14px;
    line-height: (@baseline * 2) - 2;
    border-right: 1px solid;
    border-right-color: #ddd;
    border-right-color: rgba(0,0,0,.15);
    *border-right-color: #ddd; /* IE6-7 */
    text-decoration: none;
  }
  a:hover,
  .active a {
    background-color: lighten(@blue, 45%);
  }
  .disabled a,
  .disabled a:hover {
    background-color: transparent;
    color: @grayLight;
  }
  .next a {
    border: 0;
Jacob Thornton's avatar
Jacob Thornton committed
705
706
707
708
  }
}


709
// WELLS
710
// -----
Jacob Thornton's avatar
Jacob Thornton committed
711

712
713
.well {
  background-color: #f5f5f5;
Jacob Thornton's avatar
Jacob Thornton committed
714
715
716
  margin-bottom: 20px;
  padding: 19px;
  min-height: 20px;
717
718
  border: 1px solid #eee;
  border: 1px solid rgba(0,0,0,.05);
Jacob Thornton's avatar
Jacob Thornton committed
719
  .border-radius(4px);
720
  .box-shadow(inset 0 1px 1px rgba(0,0,0,.05));
721
722
723
724
  blockquote {
    border-color: #ddd;
    border-color: rgba(0,0,0,.15);
  }
Jacob Thornton's avatar
Jacob Thornton committed
725
}
726
727


728
// MODALS
729
// ------
730

731
.modal-backdrop {
732
  background-color:#000;
733
  &.fade { opacity: 0; }
734
735
736
737
738
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
Mark Otto's avatar
Mark Otto committed
739
  z-index: 10000;
740
}
Jacob Thornton's avatar
Jacob Thornton committed
741

Jacob Thornton's avatar
blah    
Jacob Thornton committed
742
.modal-backdrop, .modal-backdrop.fade.in {
Jacob Thornton's avatar
Jacob Thornton committed
743
  .opacity(80);
Jacob Thornton's avatar
blah    
Jacob Thornton committed
744
745
}

746
.modal {
747
748
749
750
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 2000;
751
  width: 560px;
Jacob Thornton's avatar
Jacob Thornton committed
752
  margin: -250px 0 0 -250px;
753
  background-color: @white;
754
  border: 1px solid #999;
Mark Otto's avatar
Mark Otto committed
755
  border: 1px solid rgba(0,0,0,.3);
Jacob Thornton's avatar
Jacob Thornton committed
756
  *border: 1px solid #999; /* IE6-7 */
757
  .border-radius(6px);
758
  .box-shadow(0 3px 7px rgba(0,0,0,0.3));
759
  .background-clip(padding-box);
760
  .close { margin-top: 7px; }
Jacob Thornton's avatar
Jacob Thornton committed
761
762
763
764
765
  &.fade {
    .transition(e('opacity .3s linear, top .3s ease-out'));
    top: -25%;
  }
  &.fade.in { top: 50%; }
766
767
768
}
.modal-header {
  border-bottom: 1px solid #eee;
769
  padding: 5px 15px;
770
771
}
.modal-body {
772
  padding: 15px;
773
774
775
}
.modal-footer {
  background-color: #f5f5f5;
776
  padding: 14px 15px 15px;
777
778
779
780
781
782
  border-top: 1px solid #ddd;
  .border-radius(0 0 6px 6px);
  .box-shadow(inset 0 1px 0 #fff);
  .clearfix();
  margin-bottom: 0;
  .btn {
783
    float: right;
Mark Otto's avatar
Mark Otto committed
784
    margin-left: 5px;
785
  }
786
}
Jacob Thornton's avatar
Jacob Thornton committed
787

Mark Otto's avatar
Mark Otto committed
788

789
// POPOVER ARROWS
Mark Otto's avatar
Mark Otto committed
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
// --------------

#popoverArrow {
  .above(@arrowWidth: 5px) {
    bottom: 0;
    left: 50%;
    margin-left: -@arrowWidth;
    border-left: @arrowWidth solid transparent;
    border-right: @arrowWidth solid transparent;
    border-top: @arrowWidth solid #000;
  }
  .left(@arrowWidth: 5px) {
    top: 50%;
    right: 0;
    margin-top: -@arrowWidth;
    border-top: @arrowWidth solid transparent;
    border-bottom: @arrowWidth solid transparent;
    border-left: @arrowWidth solid #000;
  }
  .below(@arrowWidth: 5px) {
    top: 0;
    left: 50%;
    margin-left: -@arrowWidth;
    border-left: @arrowWidth solid transparent;
    border-right: @arrowWidth solid transparent;
    border-bottom: @arrowWidth solid #000;
  }
  .right(@arrowWidth: 5px) {
    top: 50%;
    left: 0;
    margin-top: -@arrowWidth;
    border-top: @arrowWidth solid transparent;
    border-bottom: @arrowWidth solid transparent;
    border-right: @arrowWidth solid #000;
  }
}

827
// TWIPSY
Jacob Thornton's avatar
Jacob Thornton committed
828
829
// ------

830
.twipsy {
Jacob Thornton's avatar
Jacob Thornton committed
831
832
833
834
  display: block;
  position: absolute;
  visibility: visible;
  padding: 5px;
Mark Otto's avatar
Mark Otto committed
835
  font-size: 11px;
Mark Otto's avatar
Mark Otto committed
836
  z-index: 1000;
Jacob Thornton's avatar
Jacob Thornton committed
837
  .opacity(80);
838
839
840
  &.fade.in {
    .opacity(80);
  }
Mark Otto's avatar
Mark Otto committed
841
842
843
844
  &.above .twipsy-arrow   { #popoverArrow > .above(); }
  &.left .twipsy-arrow    { #popoverArrow > .left(); }
  &.below .twipsy-arrow   { #popoverArrow > .below(); }
  &.right .twipsy-arrow   { #popoverArrow > .right(); }
845
846
847
848
849
850
851
852
853
854
855
856
857
858
}
.twipsy-inner {
  padding: 3px 8px;
  background-color: #000;
  color: white;
  text-align: center;
  max-width: 200px;
  text-decoration: none;
  .border-radius(4px);
}
.twipsy-arrow {
  position: absolute;
  width: 0;
  height: 0;
Mark Otto's avatar
Mark Otto committed
859
860
861
}


862
// POPOVERS
Mark Otto's avatar
Mark Otto committed
863
864
865
866
867
868
// --------

.popover {
  position: absolute;
  top: 0;
  left: 0;
Mark Otto's avatar
Mark Otto committed
869
  z-index: 1000;
Mark Otto's avatar
Mark Otto committed
870
  padding: 5px;
Jacob Thornton's avatar
Jacob Thornton committed
871
872
873
874
875
  display: none;
  &.above .arrow { #popoverArrow > .above(); }
  &.right .arrow { #popoverArrow > .right(); }
  &.below .arrow { #popoverArrow > .below(); }
  &.left .arrow  { #popoverArrow > .left(); }
Mark Otto's avatar
Mark Otto committed
876
877
878
879
880
  .arrow {
    position: absolute;
    width: 0;
    height: 0;
  }
Jacob Thornton's avatar
Jacob Thornton committed
881
  .inner {
882
883
    background: #333;
    background: rgba(0,0,0,.8);
Jacob Thornton's avatar
Jacob Thornton committed
884
885
886
887
888
889
    padding: 3px;
    overflow: hidden;
    width: 280px;
    .border-radius(6px);
    .box-shadow(0 3px 7px rgba(0,0,0,0.3));
  }
Mark Otto's avatar
Mark Otto committed
890
  .title {
891
    background-color: #f5f5f5;
Mark Otto's avatar
Mark Otto committed
892
893
    padding: 9px 15px;
    line-height: 1;
Jacob Thornton's avatar
Jacob Thornton committed
894
895
    .border-radius(3px 3px 0 0);
    border-bottom:1px solid #eee;
Mark Otto's avatar
Mark Otto committed
896
897
898
899
  }
  .content {
    background-color: @white;
    padding: 14px;
Jacob Thornton's avatar
Jacob Thornton committed
900
    .border-radius(0 0 3px 3px);
901
    .background-clip(padding-box);
Mark Otto's avatar
Mark Otto committed
902
903
904
905
    p, ul, ol {
      margin-bottom: 0;
    }
  }
906
}
907
908


909
// PATTERN ANIMATIONS
910
911
// ------------------

912
.fade {
913
914
  .transition(opacity .15s linear);
  opacity: 0;
915
  &.in {
916
917
    opacity: 1;
  }
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
}


// LABELS
// ------

.label {
  padding: 1px 3px 2px;
  background-color: @grayLight;
  font-size: @basefont * .75;
  font-weight: bold;
  color: @white;
  text-transform: uppercase;
  .border-radius(3px);
  &.important { background-color: #c43c35; }
  &.warning   { background-color: @orange; }
  &.success   { background-color: @green; }
  &.notice    { background-color: lighten(@blue, 25%); }
Mark Otto's avatar
Mark Otto committed
936
937
938
939
940
941
942
943
}


// MEDIA GRIDS
// -----------

.media-grid {
  margin-left: -20px;
Mark Otto's avatar
Mark Otto committed
944
945
  margin-bottom: 0;
  .clearfix();
Mark Otto's avatar
Mark Otto committed
946
947
948
  li {
    display: inline;
  }
Mark Otto's avatar
Mark Otto committed
949
  a {
Mark Otto's avatar
Mark Otto committed
950
951
952
953
954
955
    float: left;
    padding: 4px;
    margin: 0 0 20px 20px;
    border: 1px solid #ddd;
    .border-radius(4px);
    .box-shadow(0 1px 1px rgba(0,0,0,.075));
Mark Otto's avatar
Mark Otto committed
956
957
958
    img {
      display: block;
    }
Mark Otto's avatar
Mark Otto committed
959
960
961
962
963
964
    &:hover {
      border-color: @linkColor;
      .box-shadow(0 1px 4px rgba(0,105,214,.25));
    }
  }
}