You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1002 B

6 years ago
@import '../../style/themes/default';
@import '../../style/mixins/index';
8 years ago
6 years ago
@avatar-prefix-cls: ~'@{ant-prefix}-avatar';
8 years ago
.@{avatar-prefix-cls} {
.reset-component;
8 years ago
display: inline-block;
text-align: center;
background: @avatar-bg;
color: @avatar-color;
8 years ago
white-space: nowrap;
position: relative;
8 years ago
overflow: hidden;
vertical-align: middle;
&-image {
background: transparent;
}
8 years ago
.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 {
width: 100%;
height: 100%;
7 years ago
display: block;
8 years ago
}
}
.avatar-size(@size, @font-size) {
width: @size;
height: @size;
line-height: @size;
border-radius: 50%;
8 years ago
&-string {
position: absolute;
left: 50%;
transform-origin: 0 center;
}
8 years ago
&.@{avatar-prefix-cls}-icon {
font-size: @font-size;
}
}