From 0bd4112ae23af84159f4c3f3093c4351c5238503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Tue, 24 Sep 2019 17:49:17 +0200 Subject: [PATCH] Avoid avatars to be shrinked by flexbox policies (#3750) * Avoid avatars to be shrinked by flexbox policies * fixing post avatar size --- .../post_profile_picture/post_profile_picture.jsx | 2 +- components/widgets/users/avatar.scss | 6 ++++++ sass/layout/_post.scss | 11 ++--------- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/components/post_profile_picture/post_profile_picture.jsx b/components/post_profile_picture/post_profile_picture.jsx index b04b8d55f6a2..d8c13ce8d47e 100644 --- a/components/post_profile_picture/post_profile_picture.jsx +++ b/components/post_profile_picture/post_profile_picture.jsx @@ -105,7 +105,7 @@ export default class PostProfilePicture extends React.PureComponent { hasMention={hasMention} isBusy={isBusy} isRHS={isRHS} - size='lg' + size='md' src={src} profileSrc={profileSrc} isEmoji={isEmoji} diff --git a/components/widgets/users/avatar.scss b/components/widgets/users/avatar.scss index df935cffc37d..ffd605614ef5 100644 --- a/components/widgets/users/avatar.scss +++ b/components/widgets/users/avatar.scss @@ -2,26 +2,32 @@ border-radius: 50%; &.Avatar-xs { width: 16px; + min-width: 16px; height: 16px; } &.Avatar-sm { width: 24px; + min-width: 24px; height: 24px; } &.Avatar-md { width: 32px; + min-width: 32px; height: 32px; } &.Avatar-lg { width: 36px; + min-width: 36px; height: 36px; } &.Avatar-xl { width: 50px; + min-width: 50px; height: 50px; } &.Avatar-xxl { width: 128px; + min-width: 128px; height: 128px; } } diff --git a/sass/layout/_post.scss b/sass/layout/_post.scss index e8d3a02e0a69..e44890e67f1f 100644 --- a/sass/layout/_post.scss +++ b/sass/layout/_post.scss @@ -1461,24 +1461,17 @@ } .profile-icon { - @include border-radius(50px); display: inline-flex; overflow: hidden; justify-content: center; align-items: center; - img { - max-width: none; - vertical-align: inherit; - height: 32px; - width: 32px; - } - &.emoji { - @include border-radius(unset); img { + @include border-radius(unset); height: 28px; width: 28px; + min-width: 28px; } } }