From cb264dae75d94151e9b2a95aca48dde1e45a9fbb Mon Sep 17 00:00:00 2001 From: CenTdemeern1 Date: Thu, 3 Oct 2024 19:12:10 +0200 Subject: [PATCH] Use negative z-index to position decorations behind the avatar Co-authored-by: dakkar --- .../src/components/global/MkAvatar.vue | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/packages/frontend/src/components/global/MkAvatar.vue b/packages/frontend/src/components/global/MkAvatar.vue index e9df7083e3..4a01d3f32d 100644 --- a/packages/frontend/src/components/global/MkAvatar.vue +++ b/packages/frontend/src/components/global/MkAvatar.vue @@ -7,20 +7,6 @@ SPDX-License-Identifier: AGPL-3.0-only -
@@ -37,6 +23,20 @@ SPDX-License-Identifier: AGPL-3.0-only
+
@@ -115,7 +115,7 @@ function getDecorationOffset(decoration: Omit) { - return decoration.showBelow ? '0' : undefined; + return decoration.showBelow ? '-1' : undefined; } const color = ref(); @@ -164,6 +164,7 @@ watch(() => props.user.avatarBlurhash, () => { flex-shrink: 0; border-radius: 100%; // sharkey: controlled by square avatars setting! line-height: 16px; + z-index: 0; // sharkey: starts stacking context to help with showing decorations behind the avatar } .inner {