Skip to content

A platform for community discussion. Free, open, simple.

UX: Adjust styling of own avatar link on user card (#36297)

Penar Musaraj37d8e3177103
diff --git a/app/assets/stylesheets/common/components/user-card.scss b/app/assets/stylesheets/common/components/user-card.scss
index 48b0c538615..c9bacf997ad 100644
--- a/app/assets/stylesheets/common/components/user-card.scss
+++ b/app/assets/stylesheets/common/components/user-card.scss
@@ -193,30 +193,33 @@
opacity: 0;
position: absolute;
width: 80%;
- height: 80%;
- border-radius: 50%;
+ height: 85%;
right: 0%;
bottom: 0%;
- font-size: 1.25rem;
display: flex;
justify-content: center;
align-items: center;
transition: opacity 0.2s;
+ z-index: 1;
- .d-icon {
- position: inherit;
+ &--icon {
position: absolute;
- bottom: 0%;
- right: 0%;
+ bottom: -4px;
+ right: -6px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
background-color: rgb(var(--secondary-rgb), 1);
border-radius: 50%;
- padding: 0.5rem;
+ padding: 0.75rem;
+ font-size: 1.25rem;
color: var(--primary);
box-shadow: var(--shadow-dropdown);
+ box-sizing: border-box;
}
&:hover {
- opacity: 0.9;
+ opacity: 1;
}
}
}
diff --git a/frontend/discourse/app/components/user-card-contents.gjs b/frontend/discourse/app/components/user-card-contents.gjs
index a778ecadffa..a7d2d801b6b 100644
--- a/frontend/discourse/app/components/user-card-contents.gjs
+++ b/frontend/discourse/app/components/user-card-contents.gjs
@@ -399,12 +399,14 @@ export default class UserCardContents extends CardContentsBase {
class="card-huge-avatar"
tabindex="-1"
>
+ {{boundAvatar this.user "huge"}}
{{#if this.isOwnCard}}
<span class="own-avatar-pencil">
- {{icon "pencil"}}
+ <span class="own-avatar-pencil--icon">
+ {{icon "pencil"}}
+ </span>
</span>
{{/if}}
- {{boundAvatar this.user "huge"}}
</a>
{{/if}}