2019-11-19 18:38:01 +08:00
|
|
|
@import './mixins/mixins.scss';
|
|
|
|
|
|
|
|
@mixin avatar-size-mixin($size) {
|
|
|
|
@include m($size + '-size') {
|
|
|
|
$width: map-get($--n-height, $size);
|
|
|
|
width: $width;
|
|
|
|
height: $width;
|
|
|
|
@include m(circle-shaped, round-shaped) {
|
|
|
|
border-radius: $width / 2;
|
|
|
|
}
|
|
|
|
@include e(text) {
|
|
|
|
line-height: 1.25;
|
|
|
|
}
|
2019-11-22 13:21:32 +08:00
|
|
|
@include b(icon) {
|
2019-11-22 13:27:49 +08:00
|
|
|
font-size: $width;
|
2019-11-22 13:21:32 +08:00
|
|
|
}
|
2019-11-19 18:38:01 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@include themes-mixin {
|
|
|
|
@include b(avatar) {
|
2019-11-28 14:03:12 +08:00
|
|
|
@include once {
|
|
|
|
@include avatar-size-mixin('small');
|
|
|
|
@include avatar-size-mixin('medium');
|
|
|
|
@include avatar-size-mixin('large');
|
|
|
|
@include b(icon) {
|
|
|
|
transition: fill .3s $default-cubic-bezier;
|
|
|
|
fill: white;
|
|
|
|
vertical-align: bottom;
|
|
|
|
}
|
|
|
|
color: white;
|
|
|
|
transition: background-color .3s $default-cubic-bezier, color .3s $default-cubic-bezier;
|
|
|
|
font-size: 14px;
|
2019-11-19 18:38:01 +08:00
|
|
|
display: inline-block;
|
2019-11-28 14:03:12 +08:00
|
|
|
position: relative;
|
|
|
|
border-radius: 6px;
|
|
|
|
overflow: hidden;
|
|
|
|
text-align: center;
|
|
|
|
img {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
@include e(text) {
|
|
|
|
white-space: nowrap;
|
|
|
|
display: inline-block;
|
|
|
|
position: absolute;
|
|
|
|
left: 50%;
|
|
|
|
top: 50%;
|
|
|
|
}
|
2019-11-19 18:38:01 +08:00
|
|
|
}
|
2019-11-28 14:03:12 +08:00
|
|
|
background-color: $--avatar-background-color;
|
2019-11-19 18:38:01 +08:00
|
|
|
}
|
|
|
|
}
|