kui-vue
Version:
A lightweight desktop UI component library suitable for Vue.js 2.
71 lines (61 loc) • 1.07 kB
text/less
@import '../../styles/var.less';
.k-avatar {
margin: 0;
padding: 0;
color: #fff;
background-color: var(--kui-color-gray-30);
border-radius: 50%;
height: 32px;
width: 32px;
line-height: 32px;
text-align: center;
font-size: 14px;
white-space: nowrap;
overflow: hidden;
vertical-align: middle;
position: relative;
zoom: 1;
display: inline-flex;
align-items: center;
justify-content: center;
text-align: center;
cursor: pointer;
flex-shrink: 0;
&>img {
display: block;
width: 100%;
height: 100%;
-o-object-fit: cover;
object-fit: cover;
}
&.k-avatar-icon {
font-size: 18px;
}
}
.k-avatar-lg {
width: 40px;
height: 40px;
line-height: 40px;
&.k-avatar-icon {
font-size: 24px;
}
}
.k-avatar-sm {
width: 24px;
height: 24px;
line-height: 24px;
&.k-avatar-icon {
font-size: 14px;
}
}
.k-avatar-square {
border-radius: 4px;
}
.k-avatar-image {
background-color: transparent;
}
.k-avatar-string {
position: absolute;
left: 50%;
transform-origin: 0 center;
}