2019-05-06 12:04:39 +08:00
|
|
|
@import '../../style/themes/index';
|
2018-12-07 16:17:45 +08:00
|
|
|
@import '../../style/mixins/index';
|
2017-05-28 14:20:59 +08:00
|
|
|
|
2018-12-07 16:17:45 +08:00
|
|
|
@avatar-prefix-cls: ~'@{ant-prefix}-avatar';
|
2017-05-28 14:20:59 +08:00
|
|
|
|
|
|
|
.@{avatar-prefix-cls} {
|
2017-09-22 18:33:29 +08:00
|
|
|
.reset-component;
|
2019-04-15 10:52:00 +08:00
|
|
|
|
2019-02-15 10:48:07 +08:00
|
|
|
position: relative;
|
2017-05-28 14:20:59 +08:00
|
|
|
display: inline-block;
|
2019-02-15 10:48:07 +08:00
|
|
|
overflow: hidden;
|
2017-05-28 14:20:59 +08:00
|
|
|
color: @avatar-color;
|
2017-06-07 11:18:31 +08:00
|
|
|
white-space: nowrap;
|
2019-02-15 10:48:07 +08:00
|
|
|
text-align: center;
|
2018-01-23 21:02:50 +08:00
|
|
|
vertical-align: middle;
|
2019-02-15 10:48:07 +08:00
|
|
|
background: @avatar-bg;
|
2018-01-23 21:02:50 +08:00
|
|
|
|
|
|
|
&-image {
|
|
|
|
background: transparent;
|
|
|
|
}
|
2017-05-28 14:20:59 +08:00
|
|
|
|
|
|
|
.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 {
|
2019-02-15 10:48:07 +08:00
|
|
|
display: block;
|
2017-05-28 14:20:59 +08:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2019-09-11 19:23:36 +08:00
|
|
|
object-fit: cover;
|
2017-05-28 14:20:59 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.avatar-size(@size, @font-size) {
|
|
|
|
width: @size;
|
|
|
|
height: @size;
|
|
|
|
line-height: @size;
|
2018-07-12 17:35:02 +08:00
|
|
|
border-radius: 50%;
|
2017-05-28 14:20:59 +08:00
|
|
|
|
2018-10-28 23:45:36 +08:00
|
|
|
&-string {
|
|
|
|
position: absolute;
|
|
|
|
left: 50%;
|
|
|
|
transform-origin: 0 center;
|
|
|
|
}
|
|
|
|
|
2017-05-28 14:20:59 +08:00
|
|
|
&.@{avatar-prefix-cls}-icon {
|
|
|
|
font-size: @font-size;
|
|
|
|
}
|
|
|
|
}
|