ant-design-vue/components/avatar/style/index.less

51 lines
886 B
Plaintext
Raw Normal View History

2017-11-09 10:57:34 +00:00
@import "../../style/themes/default";
2018-01-16 03:13:22 +00:00
@import "../../style/mixins/index";
2017-11-09 10:57:34 +00:00
@avatar-prefix-cls: ~"@{ant-prefix}-avatar";
.@{avatar-prefix-cls} {
2018-01-16 03:13:22 +00:00
.reset-component;
2017-11-09 10:57:34 +00:00
display: inline-block;
text-align: center;
background: @avatar-bg;
color: @avatar-color;
white-space: nowrap;
position: relative;
overflow: hidden;
.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%;
display: block;
}
}
.avatar-size(@size, @font-size) {
width: @size;
height: @size;
line-height: @size;
border-radius: @size / 2;
& > * {
line-height: @size;
}
&.@{avatar-prefix-cls}-icon {
font-size: @font-size;
}
}