Blame view

node_modules/element-ui/packages/theme-chalk/src/badge.scss 1.33 KB
2a09d1a4   liuqimichale   添加宜春 天水 宣化
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
50
51
52
53
54
55
56
57
  @import "mixins/mixins";
  @import "common/var";
  
  @include b(badge) {
    position: relative;
    vertical-align: middle;
    display: inline-block;
  
    @include e(content) {
      background-color: $--badge-fill;
      border-radius: $--badge-radius;
      color: $--color-white;
      display: inline-block;
      font-size: $--badge-font-size;
      height: $--badge-size;
      line-height: $--badge-size;
      padding: 0 $--badge-padding;
      text-align: center;
      white-space: nowrap;
      border: 1px solid $--color-white;
  
      @include when(fixed) {
        position: absolute;
        top: 0;
        right: #{1 + $--badge-size / 2};
        transform: translateY(-50%) translateX(100%);
  
        @include when(dot) {
          right: 5px;
        }
      }
  
      @include when(dot) {
        height: 8px;
        width: 8px;
        padding: 0;
        right: 0;
        border-radius: 50%;
      }
  
      @each $type in (primary, success, warning, info, danger) {
        @include m($type) {
          @if $type == primary {
            background-color: $--color-primary;
          } @else if $type == success {
            background-color: $--color-success;
          } @else if $type == warning {
            background-color: $--color-warning;
          } @else if $type == info {
            background-color: $--color-info;
          } @else {
            background-color: $--color-danger;
          }
        }
      }
    }
  }