1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
| @use 'sass:map';
|
| @use 'mixins/mixins' as *;
| @use 'mixins/var' as *;
| @use 'common/var' as *;
|
| @include b(avatar) {
| @include set-component-css-var('avatar', $avatar);
| @include set-component-css-var('avatar-size', $avatar-size);
|
| @include set-css-var-value(
| ('avatar', 'size'),
| map.get($avatar-size, 'default')
| );
|
| display: inline-flex;
| justify-content: center;
| align-items: center;
| box-sizing: border-box;
| text-align: center;
| overflow: hidden;
| color: getCssVar('avatar', 'text-color');
| background: getCssVar('avatar', 'bg-color');
| width: getCssVar('avatar', 'size');
| height: getCssVar('avatar', 'size');
| font-size: getCssVar('avatar', 'text-size');
|
| > img {
| display: block;
| height: 100%;
| }
|
| @include m(circle) {
| border-radius: 50%;
| }
|
| @include m(square) {
| border-radius: getCssVar('avatar', 'border-radius');
| }
|
| @include m(icon) {
| font-size: getCssVar('avatar', 'icon-size');
| }
|
| @each $size in (small, large) {
| @include m($size) {
| @include set-css-var-value(
| ('avatar', 'size'),
| map.get($avatar-size, $size)
| );
| }
| }
| }
|
|