Skip to content

Commit 66e3176

Browse files
committed
Avatar: Fix 1px colored ring around avatars
1 parent eb9f746 commit 66e3176

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

‎src/components/common/Avatar.scss‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,24 @@
5959
width: 100%;
6060
height: 100%;
6161
border-radius: var(--radius);
62+
}
63+
64+
> .inner::before {
65+
content: "";
66+
67+
position: absolute;
68+
z-index: -1;
69+
inset: 0;
70+
71+
border-radius: var(--radius);
6272

6373
background-image: linear-gradient(var(--color-white) -300%, var(--color-user));
6474
}
6575

76+
&.with-media > .inner::before {
77+
inset: 1px;
78+
}
79+
6680
&__media {
6781
width: 100%;
6882
height: 100%;
@@ -160,7 +174,7 @@
160174
--color-user: var(--color-deleted-account);
161175
}
162176

163-
&.premium-gradient-bg > .inner {
177+
&.premium-gradient-bg > .inner::before {
164178
background-image: var(--premium-gradient);
165179
}
166180

‎src/components/common/Avatar.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ const Avatar = ({
281281
isRoundedRect && 'forum',
282282
asMessageBubble && 'message-bubble',
283283
(photo || webPhoto) && 'force-fit',
284+
(!specialIcon && hasBlobUrl) && 'with-media',
284285
((withStory && realPeer?.hasStories) || forPremiumPromo) && 'with-story-circle',
285286
withStorySolid && realPeer?.hasStories && 'with-story-solid',
286287
withStorySolid && forceFriendStorySolid && 'close-friend',

0 commit comments

Comments
 (0)