Blame view

src/styles/components/avatar.less 1.06 KB
2c5faf30   梁灏   init Avatar compo...
1
2
3
  @avatar-prefix-cls: ~"@{css-prefix}avatar";
  
  .@{avatar-prefix-cls} {
a1530fac   梁灏   update Avatar
4
5
6
7
8
9
10
      display: inline-block;
      text-align: center;
      background: @avatar-bg;
      color: @avatar-color;
      white-space: nowrap;
      position: relative;
      overflow: hidden;
84a4a95d   梁灏   fixed #1926
11
      vertical-align: middle;
2c5faf30   梁灏   init Avatar compo...
12
  
7a2f62ed   梁灏   update Avatar style
13
14
15
16
      &-image{
          background: transparent;
      }
  
acf00f5c   梁灏   update Avatar style
17
18
19
20
21
      .ivu-icon{
          position: relative;
          top: -1px;
      }
  
a1530fac   梁灏   update Avatar
22
23
24
25
      .avatar-size(@avatar-size-base, @avatar-font-size-base);
  
      &-large {
          .avatar-size(@avatar-size-lg, @avatar-font-size-lg);
acf00f5c   梁灏   update Avatar style
26
27
28
29
          .ivu-icon{
              position: relative;
              top: -2px;
          }
a1530fac   梁灏   update Avatar
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
58
59
      }
  
      &-small {
          .avatar-size(@avatar-size-sm, @avatar-font-size-sm);
      }
  
      &-square {
          border-radius: @avatar-border-radius;
      }
  
      & > img {
          width: 100%;
          height: 100%;
      }
  }
  
  .avatar-size(@size, @font-size) {
      width: @size;
      height: @size;
      line-height: @size;
      border-radius: @size / 2;
  
      & > * {
          line-height: @size;
      }
  
      &.@{avatar-prefix-cls}-icon {
          font-size: @font-size;
      }
  }