|
5 | 5 | */ |
6 | 6 | @media lumo_components_avatar { |
7 | 7 | :host { |
8 | | - position: relative; |
9 | | - display: inline-block; |
10 | | - flex: none; |
11 | | - overflow: hidden; |
12 | | - height: var(--vaadin-avatar-size, 64px); |
13 | | - width: var(--vaadin-avatar-size, 64px); |
| 8 | + --vaadin-avatar-outline-width: var(--vaadin-focus-ring-width, 2px); |
14 | 9 | border: var(--vaadin-avatar-outline-width) solid transparent; |
15 | 10 | margin: calc(var(--vaadin-avatar-outline-width) * -1); |
16 | | - background-clip: content-box; |
17 | | - --vaadin-avatar-outline-width: var(--vaadin-focus-ring-width, 2px); |
18 | 11 | color: var(--lumo-secondary-text-color); |
19 | 12 | background-color: var(--lumo-contrast-10pct); |
20 | | - border-radius: 50%; |
21 | 13 | outline: none; |
22 | | - cursor: default; |
23 | | - user-select: none; |
24 | | - -webkit-tap-highlight-color: transparent; |
25 | 14 | -webkit-font-smoothing: antialiased; |
26 | 15 | -moz-osx-font-smoothing: grayscale; |
27 | | - } |
28 | | - |
29 | | - img { |
30 | | - height: 100%; |
31 | | - width: 100%; |
32 | | - object-fit: cover; |
| 16 | + vertical-align: baseline; |
33 | 17 | } |
34 | 18 |
|
35 | 19 | [part='icon'] { |
36 | 20 | display: flex; |
37 | 21 | align-items: center; |
38 | 22 | justify-content: center; |
39 | | - height: 100%; |
40 | 23 | font-size: var(--vaadin-avatar-size, 64px); |
41 | 24 | line-height: 1; |
| 25 | + mask: none; |
| 26 | + background: none; |
42 | 27 | } |
43 | 28 |
|
44 | 29 | [part='icon']::before { |
|
51 | 36 | font-family: var(--lumo-font-family); |
52 | 37 | font-size: 2.4375em; |
53 | 38 | font-weight: 500; |
54 | | - fill: currentColor; |
55 | | - } |
56 | | - |
57 | | - :host([hidden]), |
58 | | - [hidden] { |
59 | | - display: none !important; |
60 | 39 | } |
61 | 40 |
|
62 | 41 | :host([has-color-index]) { |
63 | | - background-color: var(--vaadin-avatar-user-color); |
64 | 42 | color: var(--lumo-base-color); |
65 | 43 | } |
66 | 44 |
|
67 | 45 | :host([has-color-index])::before { |
68 | | - position: absolute; |
69 | | - content: ''; |
70 | | - inset: 0; |
71 | | - border-radius: inherit; |
| 46 | + border: none; |
72 | 47 | box-shadow: inset 0 0 0 2px var(--vaadin-avatar-user-color); |
73 | 48 | } |
74 | 49 |
|
75 | 50 | :host([focus-ring]) { |
| 51 | + outline: none; |
76 | 52 | border-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct)); |
77 | 53 | } |
78 | 54 |
|
|
0 commit comments