Skip to content

Commit 9812248

Browse files
authored
fix(b-avatar): image fit and scale (closes #5610, #5655) (#5675)
* fix(b-avavtar): image fit and scale * Update _avatar.scss * Update _avatar.scss
1 parent c7c14ea commit 9812248

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/components/avatar/_avatar.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@
5757
display: flex;
5858
justify-content: center;
5959
align-items: center;
60+
// https://gist.github.com/ayamflow/b602ab436ac9f05660d9c15190f4fd7b
61+
mask-image: radial-gradient(white, black);
6062
}
6163

6264
.b-avatar-text {
@@ -79,6 +81,9 @@
7981
height: 100%;
8082
max-height: auto;
8183
border-radius: inherit;
84+
// This is not supported in IE11 and Edge <16
85+
// https://caniuse.com/#feat=object-fit
86+
object-fit: cover;
8287
}
8388

8489
.b-avatar-badge {

0 commit comments

Comments
 (0)