Summary Files Commits Branches @commit @diff @stats
path: root / src / badges.less
blob: e27418451f7675f7130f465d164c0dd0e7435f08 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Badges
.badge {
  display: inline-block;
  position: relative;

  &[data-badge],
  &:not([data-badge]) {
    &::after {
      background: @core-color;
      background-clip: padding-box;
      border: .1rem solid #fff;
      border-radius: 1rem;
      color: @core-light-color;
      content: attr(data-badge);
      display: inline-block;
      transform: translate(-.4rem, -1rem);
    }
  }
  &[data-badge] {
    &::after {
      font-size: 1.2rem;
      height: 2rem;
      line-height: 1.4rem;
      min-width: 2rem;
      padding: .2rem .5rem;
      text-align: center;
      white-space: nowrap;
    }
  }
  &:not([data-badge]),
  &[data-badge=''] {
    &::after {
      height: .8rem;
      min-width: .8rem;
      padding: 0;
      width: .8rem;
    }
  }

  // Badges for Buttons
  &.btn {
    &::after {
      position: absolute;
      top: 0;
      right: 0;
      transform: translate(50%, -50%);
    }
  }
}