index.less
1.14 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
@import '../../style/themes/index';
@import '../../style/mixins/index';
@avatar-prefix-cls: ~'@{ant-prefix}-avatar';
.@{avatar-prefix-cls} {
.reset-component;
position: relative;
display: inline-block;
overflow: hidden;
color: @avatar-color;
white-space: nowrap;
text-align: center;
vertical-align: middle;
background: @avatar-bg;
&-image {
background: transparent;
}
.@{ant-prefix}-image-img {
display: block;
}
.avatar-size(@avatar-size-base, @avatar-font-size-base);
&-lg {
.avatar-size(@avatar-size-lg, @avatar-font-size-lg);
}
&-sm {
.avatar-size(@avatar-size-sm, @avatar-font-size-sm);
}
&-square {
border-radius: @avatar-border-radius;
}
& > img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
}
.avatar-size(@size, @font-size) {
width: @size;
height: @size;
line-height: @size;
border-radius: 50%;
&-string {
position: absolute;
left: 50%;
transform-origin: 0 center;
}
&.@{avatar-prefix-cls}-icon {
font-size: @font-size;
> .@{iconfont-css-prefix} {
margin: 0;
}
}
}
@import './group';
@import './rtl';