mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-19 03:54:28 +08:00
6936599aef
* rename .stylelintrc to .stylelintrc.json for explicit file type * add new npm script lint-fix:style * fix pseudo-element with double colon * function name should be lower except ignored functions * support stylelint declaration-block-no-ignored-properties rule * support sorted CSS properties order for readability and consistency * autofix order of all styles by lint-fix:style script * remove double slash comments after selector * replace .stylelintignore with ignoreFiles in .stylelintrc.json
58 lines
1002 B
Plaintext
58 lines
1002 B
Plaintext
@import '../../style/themes/default';
|
|
@import '../../style/mixins/index';
|
|
|
|
@avatar-prefix-cls: ~'@{ant-prefix}-avatar';
|
|
|
|
.@{avatar-prefix-cls} {
|
|
.reset-component;
|
|
position: relative;
|
|
display: inline-block;
|
|
overflow: hidden;
|
|
color: @avatar-color;
|
|
white-space: nowrap;
|
|
text-align: center;
|
|
vertical-align: middle;
|
|
background: @avatar-bg;
|
|
|
|
&-image {
|
|
background: transparent;
|
|
}
|
|
|
|
.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 {
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
|
|
.avatar-size(@size, @font-size) {
|
|
width: @size;
|
|
height: @size;
|
|
line-height: @size;
|
|
border-radius: 50%;
|
|
|
|
&-string {
|
|
position: absolute;
|
|
left: 50%;
|
|
transform-origin: 0 center;
|
|
}
|
|
|
|
&.@{avatar-prefix-cls}-icon {
|
|
font-size: @font-size;
|
|
}
|
|
}
|