patterns.less 17.8 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 {
36
    position: relative;
37
38
39
40
41
42
43
44
45
46
    a {
      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
47
  }
48

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

Jacob Thornton's avatar
Jacob Thornton committed
58
59
60
  // Search Form
  form {
    float: left;
Mark Otto's avatar
Mark Otto committed
61
    margin: 5px 0 0 0;
Jacob Thornton's avatar
Jacob Thornton committed
62
    position: relative;
63
    .opacity(100);
64
  }
Mark Otto's avatar
Mark Otto committed
65
66
67
68
  // Todo: remove from v2.0 when ready, added for legacy
  form.pull-right {
    float: right;
  }
69
70
71
72
73
74
75
76
77
78
79
80
  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);
81

82
83
84
85
86
87
88
89
90
91
92
    // 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
93
      color: #fff;
94
95
96
97
98
99
100
101
102
103
104
    }
    // 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
105
106
    }
  }
107
}
108

109
// gradient is applied to it's own element because overflow visible is not honored by ie when filter is present
Mark Otto's avatar
Mark Otto committed
110
// For backwards compatability, include .topbar .fill
111
.topbar-inner,
Mark Otto's avatar
Mark Otto committed
112
.topbar .fill {
113
114
115
116
117
118
  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);
}

119
120
121

// NAVIGATION
// ----------
122
123

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

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

204
205
206
207
208
209
// For backwards compatability with new dropdowns, redeclare dropdown link padding
.topbar ul .menu-dropdown li a,
.topbar ul .dropdown-menu li a {
  padding: 4px 15px;
}

210
211
// Dropdown Menus
// Use the .menu class on any <li> element within the topbar or ul.tabs and you'll get some superfancy dropdowns
212
213
// li.menu for backwards compatibility
li.menu,
214
215
216
217
.dropdown {
  position: relative;
}
// The link that is clicked to toggle the dropdown
218
219
// a.menu for backwards compatibility
a.menu:after,
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
.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)
235
236
// .menu-dropdown for backwards compatibility
.menu-dropdown,
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
.dropdown-menu {
  background-color: #fff;
  float: left;
  display: none; // None by default, but block on "open" of the menu
  position: absolute;
  top: 40px;
  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
261
    display: block;
262
    background-color: none;
263
  }
Jacob Thornton's avatar
Jacob Thornton committed
264
265
266
267
268
269
270
271
272
273
274
  // 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 {
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
  // 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
291
    }
292
293
  }
}
Jacob Thornton's avatar
Jacob Thornton committed
294

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

313

314
315
316
317
318
319
320
321
322
323
// 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
324
325
      display: block;
    }
326
327
  }
}
328

329
330
// Basic Tabs
.tabs {
331
  float: left;
332
333
334
335
  width: 100%;
  border-bottom: 1px solid #ddd;
  > li {
    position: relative; // For the dropdowns mostly
336
    top: 1px;
337
338
339
340
341
342
343
344
345
    > 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
346
347
      }
    }
348
349
350
351
352
353
354
355
    &.active > a {
      background-color: #fff;
      padding: 0 14px;
      border: 1px solid #ddd;
      border-bottom: 0;
      color: @gray;
    }
  }
356
357
  // first one for backwards compatibility
  .menu-dropdown,
358
359
360
361
362
  .dropdown-menu {
    top: 35px;
    border-width: 1px;
    .border-radius(0 6px 6px 6px);
  }
363
364
  // first one for backwards compatibility
  a.menu:after,
365
366
367
368
369
  .dropdown-toggle:after {
    border-top-color: #999;
    margin-top: 15px;
    margin-left: 5px;
  }
370
  // first one for backwards compatibility
371
372
373
374
375
  li.open.menu .menu,
  .open.dropdown .dropdown-toggle {
    border-color: #999;
  }
  // first one for backwards compatibility
376
  li.open a.menu:after,
377
378
379
380
381
382
383
  .dropdown.open .dropdown-toggle:after {
    border-top-color: #555;
  }
}

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

404

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


431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
// 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;
  }
}
451
452
453
454
455
footer {
  margin-top: @baseline - 1;
  padding-top: @baseline - 1;
  border-top: 1px solid #eee;
}
456

457

458
// PAGE HEADERS
459
// ------------
Jacob Thornton's avatar
Jacob Thornton committed
460

461
.page-header {
Jacob Thornton's avatar
Jacob Thornton committed
462
463
464
465
  margin-bottom: @baseline - 1;
  border-bottom: 1px solid #ddd;
  .box-shadow(0 1px 0 rgba(255,255,255,.5));
  h1 {
466
    margin-bottom: (@baseline / 2) - 1px;
Jacob Thornton's avatar
Jacob Thornton committed
467
468
469
  }
}

470

471
472
// BUTTON STYLES
// -------------
Jacob Thornton's avatar
Jacob Thornton committed
473

474
475
476
477
478
// Base .btn styles
.btn {
  // Button Base
  cursor: pointer;
  display: inline-block;
Mark Otto's avatar
Mark Otto committed
479
  #gradient > .vertical-three-colors(#ffffff, #ffffff, 25%, darken(#ffffff, 10%)); // Don't use .gradientbar() here since it does a three-color gradient
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
  padding: 5px 14px 6px;
  text-shadow: 0 1px 1px rgba(255,255,255,.75);
  color: #333;
  font-size: 13px;
  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;
  }

Jacob Thornton's avatar
Jacob Thornton committed
497
498
499
500
501
502
  // Primary Button Type
  &.primary {
    color:#fff;
    .gradientBar(@blue, @blueDark)
  }

503
504
505
506
   // Transitions
  .transition(.1s linear all);

  // Active and Disabled states
507
508
509
510
  &:active {
    @shadow: inset 0 2px 4px rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.05);
    .box-shadow(@shadow);
  }
511
512
513
  &.disabled {
    cursor: default;
    background-image: none;
514
    .reset-filter();
515
    .opacity(65);
516
    .box-shadow(none);
517
  }
518
  &[disabled] {
519
520
521
522
    // disabled pseudo can't be included with .disabled
    // def because IE8 and below will drop it ;_;
    cursor: default;
    background-image: none;
523
    .reset-filter();
524
    .opacity(65);
525
    .box-shadow(none);
526
527
528
529
530
531
532
533
534
535
536
537
538
539
  }

  // Button Sizes
  &.large {
    font-size: 16px;
    line-height: normal;
    padding: 9px 14px 9px;
    .border-radius(6px);
  }
  &.small {
    padding: 7px 9px 7px;
    font-size: 11px;
  }
}
540
541
542
543
// 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;
544
545
546
547
548
549
550
551
552
}

// 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;
  }
553
554
}

555

556
// ERROR STYLES
557
// ------------
Jacob Thornton's avatar
Jacob Thornton committed
558

559
// Base alert styles
560
.alert-message {
561
  .gradientBar(#fceec1, #eedc94); // warning by default
Jacob Thornton's avatar
Jacob Thornton committed
562
  margin-bottom: @baseline;
563
564
565
566
567
  padding: 7px 14px;
  color: @grayDark;
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
  border-width: 1px;
  border-style: solid;
568
  .border-radius(4px);
569
  .box-shadow(inset 0 1px 0 rgba(255,255,255,.25));
570

571
572
573
574
  // Remove extra margin from content
  h5 {
    line-height: @baseline;
  }
Jacob Thornton's avatar
Jacob Thornton committed
575
576
577
  p {
    margin-bottom: 0;
  }
578
579
580
581
  div {
    margin-top: 5px;
    margin-bottom: 2px;
    line-height: 28px;
Jacob Thornton's avatar
Jacob Thornton committed
582
  }
583
  .btn {
584
    // Provide actions with buttons
585
    .box-shadow(0 1px 0 rgba(255,255,255,.25));
Jacob Thornton's avatar
Jacob Thornton committed
586
  }
587
  .close {
Jacob Thornton's avatar
Jacob Thornton committed
588
589
    float: right;
    margin-top: -2px;
590
    color: @black;
Jacob Thornton's avatar
Jacob Thornton committed
591
592
    font-size: 20px;
    font-weight: bold;
593
594
    text-shadow: 0 1px 0 rgba(255,255,255,1);
    .opacity(20);
Jacob Thornton's avatar
Jacob Thornton committed
595
    &:hover {
596
      color: @black;
Jacob Thornton's avatar
Jacob Thornton committed
597
      text-decoration: none;
598
      .opacity(40);
Jacob Thornton's avatar
Jacob Thornton committed
599
600
601
    }
  }

602
  &.block-message {
603
604
    background-image: none;
    background-color: lighten(#fceec1, 5%);
605
    .reset-filter();
606
607
608
    padding: 14px;
    border-color: #fceec1;
    .box-shadow(none);
609
    ul, p {
610
611
      margin-right: 30px;
    }
612
613
614
615
616
617
    ul {
      margin-bottom: 0;
    }
    li {
      color: @grayDark;
    }
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
    .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
639
640
641
642
  }
}


643
644
// PAGINATION
// ----------
Jacob Thornton's avatar
Jacob Thornton committed
645

646
.pagination {
Jacob Thornton's avatar
Jacob Thornton committed
647
648
649
650
651
  height: @baseline * 2;
  margin: @baseline 0;
  ul {
    float: left;
    margin: 0;
652
    border: 1px solid #ddd;
Jacob Thornton's avatar
Jacob Thornton committed
653
654
    border: 1px solid rgba(0,0,0,.15);
    .border-radius(3px);
655
    .box-shadow(0 1px 2px rgba(0,0,0,.05));
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
  }
  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
681
682
683
684
  }
}


685
// WELLS
686
// -----
Jacob Thornton's avatar
Jacob Thornton committed
687

688
689
.well {
  background-color: #f5f5f5;
Jacob Thornton's avatar
Jacob Thornton committed
690
691
692
  margin-bottom: 20px;
  padding: 19px;
  min-height: 20px;
693
694
  border: 1px solid #eee;
  border: 1px solid rgba(0,0,0,.05);
Jacob Thornton's avatar
Jacob Thornton committed
695
  .border-radius(4px);
696
  .box-shadow(inset 0 1px 1px rgba(0,0,0,.05));
Jacob Thornton's avatar
Jacob Thornton committed
697
}
698
699


700
// MODALS
701
// ------
702

703
.modal-backdrop {
704
  background-color:#000;
Jacob Thornton's avatar
Jacob Thornton committed
705
706
  &.fade {
    opacity: 0;
707
  }
708
709
710
711
712
713
714
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
}
Jacob Thornton's avatar
Jacob Thornton committed
715

Jacob Thornton's avatar
blah    
Jacob Thornton committed
716
717
718
719
.modal-backdrop, .modal-backdrop.fade.in {
  .opacity(50);
}

720
.modal {
721
722
723
724
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 2000;
725
  width: 560px;
Jacob Thornton's avatar
Jacob Thornton committed
726
  margin: -250px 0 0 -250px;
727
  background-color: @white;
728
  border: 1px solid #999;
Mark Otto's avatar
Mark Otto committed
729
  border: 1px solid rgba(0,0,0,.3);
Jacob Thornton's avatar
Jacob Thornton committed
730
  *border: 1px solid #999; /* IE6-7 */
731
  .border-radius(6px);
732
  .box-shadow(0 3px 7px rgba(0,0,0,0.3));
733
  .background-clip(padding-box);
734
735
736
737
738
739
740
741
742
743
744
}
.modal-header {
  border-bottom: 1px solid #eee;
  padding: 5px 20px;
  .close {
    position: absolute;
    right: 10px;
    top: 10px;
    color: #999;
    line-height:10px;
    font-size: 18px;
745
  }
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
}
.modal-body {
  padding: 20px;
}
.modal-footer {
  background-color: #f5f5f5;
  padding: 14px 20px 15px;
  border-top: 1px solid #ddd;
  .border-radius(0 0 6px 6px);
  .box-shadow(inset 0 1px 0 #fff);
  .clearfix();
  margin-bottom: 0;
  .btn {
    float: right;
    margin-left: 10px;
761
  }
762
}
Jacob Thornton's avatar
Jacob Thornton committed
763

Mark Otto's avatar
Mark Otto committed
764

765
// POPOVER ARROWS
Mark Otto's avatar
Mark Otto committed
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
// --------------

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

803
// TWIPSY
Jacob Thornton's avatar
Jacob Thornton committed
804
805
// ------

806
.twipsy {
Jacob Thornton's avatar
Jacob Thornton committed
807
808
809
810
  display: block;
  position: absolute;
  visibility: visible;
  padding: 5px;
Mark Otto's avatar
Mark Otto committed
811
  font-size: 11px;
Mark Otto's avatar
Mark Otto committed
812
  z-index: 1000;
Jacob Thornton's avatar
Jacob Thornton committed
813
  .opacity(80);
Mark Otto's avatar
Mark Otto committed
814
815
816
817
  &.above .twipsy-arrow   { #popoverArrow > .above(); }
  &.left .twipsy-arrow    { #popoverArrow > .left(); }
  &.below .twipsy-arrow   { #popoverArrow > .below(); }
  &.right .twipsy-arrow   { #popoverArrow > .right(); }
818
819
820
821
822
823
824
825
826
827
828
829
830
831
}
.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
832
833
834
}


835
// POPOVERS
Mark Otto's avatar
Mark Otto committed
836
837
838
839
840
841
// --------

.popover {
  position: absolute;
  top: 0;
  left: 0;
Mark Otto's avatar
Mark Otto committed
842
  z-index: 1000;
Mark Otto's avatar
Mark Otto committed
843
  padding: 5px;
Jacob Thornton's avatar
Jacob Thornton committed
844
845
846
847
848
  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
849
850
851
852
853
  .arrow {
    position: absolute;
    width: 0;
    height: 0;
  }
Jacob Thornton's avatar
Jacob Thornton committed
854
  .inner {
855
856
    background: #333;
    background: rgba(0,0,0,.8);
Jacob Thornton's avatar
Jacob Thornton committed
857
858
859
860
861
862
    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
863
  .title {
864
    background-color: #f5f5f5;
Mark Otto's avatar
Mark Otto committed
865
866
    padding: 9px 15px;
    line-height: 1;
Jacob Thornton's avatar
Jacob Thornton committed
867
868
    .border-radius(3px 3px 0 0);
    border-bottom:1px solid #eee;
Mark Otto's avatar
Mark Otto committed
869
870
871
872
  }
  .content {
    background-color: @white;
    padding: 14px;
Jacob Thornton's avatar
Jacob Thornton committed
873
    .border-radius(0 0 3px 3px);
874
    .background-clip(padding-box);
Mark Otto's avatar
Mark Otto committed
875
876
877
878
    p, ul, ol {
      margin-bottom: 0;
    }
  }
879
}
880
881
882
883
884


// Pattern Animations
// ------------------

885
.fade {
886
887
  .transition(opacity .15s linear);
  opacity: 0;
888
  &.in {
889
890
891
    opacity: 1;
  }
}