blob: ad595a9557ec16bf4abc86ecbd9ac11d5f30a151 [file] [log] [blame]
Michael Landoefa037d2017-02-19 12:57:33 +02001//
2// Badges
3// --------------------------------------------------
4
5// Base class
6.badge {
7 display: inline-block;
8 min-width: 10px;
9 padding: 3px 7px;
10 font-size: $font-size-small;
11 font-weight: $badge-font-weight;
12 color: $badge-color;
13 line-height: $badge-line-height;
14 vertical-align: middle;
15 white-space: nowrap;
16 text-align: center;
17 background-color: $badge-bg;
18 border-radius: $badge-border-radius;
19
20 // Empty badges collapse automatically (not available in IE8)
21 &:empty {
22 display: none;
23 }
24
25 // Quick fix for badges in buttons
26 .btn & {
27 position: relative;
28 top: -1px;
29 }
30
31 .btn-xs &,
32 .btn-group-xs > .btn & {
33 top: 0;
34 padding: 1px 5px;
35 }
36
37 // [converter] extracted a& to a.badge
38
39 // Account for badges in navs
40 .list-group-item.active > &,
41 .nav-pills > .active > a > & {
42 color: $badge-active-color;
43 background-color: $badge-active-bg;
44 }
45
46 .list-group-item > & {
47 float: right;
48 }
49
50 .list-group-item > & + & {
51 margin-right: 5px;
52 }
53
54 .nav-pills > li > a > & {
55 margin-left: 3px;
56 }
57}
58
59// Hover state, but only for links
60a.badge {
61 &:hover,
62 &:focus {
63 color: $badge-link-hover-color;
64 text-decoration: none;
65 cursor: pointer;
66 }
67}