badges.less 923 Bytes
Newer Older
1
//
2
// Badges
3
4
// --------------------------------------------------

5
6

// Base classes
7
.badge {
8
  display: inline-block;
9
10
11
  min-width: 10px;
  padding: 3px 7px;
  font-size: 12px;
12
  font-weight: bold;
13
  color: #fff;
14
15
  line-height: 1;
  vertical-align: middle;
16
  white-space: nowrap;
17
  text-align: center;
18
  background-color: @grayLight;
19
  border-radius: 10px;
20

21
  // Empty labels/badges collapse
22
23
24
25
26
  &:empty {
    display: none;
  }
}

27
// Hover state, but only for links
28
a.badge {
29
30
  &:hover,
  &:focus {
31
    color: #fff;
32
33
34
35
36
    text-decoration: none;
    cursor: pointer;
  }
}

37
38
// Quick fix for labels/badges in buttons
.btn {
39
  .badge {
40
41
42
43
    position: relative;
    top: -1px;
  }
}
44
.btn-mini {
45
  .badge {
46
47
48
    top: 0;
  }
}
49
50

// Account for counters in navs
51
a.list-group-item.active > .badge,
52
.nav-pills > .active > a > .badge {
53
54
55
  color: @link-color;
  background-color: #fff;
}
56
.nav-pills > li > a > .badge {
57
58
  margin-left: 3px;
}