1 | // Base class
|
2 | //
|
3 | // Requires one of the contextual, color modifier classes for `color` and
|
4 | // `background-color`.
|
5 |
|
6 | .badge {
|
7 | display: inline-block;
|
8 | padding: $badge-padding-y $badge-padding-x;
|
9 | @include font-size($badge-font-size);
|
10 | font-weight: $badge-font-weight;
|
11 | line-height: 1;
|
12 | color: $badge-color;
|
13 | text-align: center;
|
14 | white-space: nowrap;
|
15 | vertical-align: baseline;
|
16 | @include border-radius($badge-border-radius);
|
17 | @include gradient-bg();
|
18 |
|
19 | // Empty badges collapse automatically
|
20 | &:empty {
|
21 | display: none;
|
22 | }
|
23 | }
|
24 |
|
25 | // Quick fix for badges in buttons
|
26 | .btn .badge {
|
27 | position: relative;
|
28 | top: -1px;
|
29 | }
|