From 686a709e87b6358e066ce32a6edc06034b4a3760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Fri, 10 Feb 2023 00:36:05 +0900 Subject: [PATCH] chore: determine dimensions of the helix of cat ears based on the size of avatars (#9836) * chore: determine dimensions of the helix of cat ears based on the size of avatars * Update MkAvatar.vue * Update packages/frontend/src/components/global/MkAvatar.vue --------- Co-authored-by: tamaina --- .../src/components/global/MkAvatar.vue | 39 +++++++++++++------ 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/packages/frontend/src/components/global/MkAvatar.vue b/packages/frontend/src/components/global/MkAvatar.vue index 812f30439..9ad06545f 100644 --- a/packages/frontend/src/components/global/MkAvatar.vue +++ b/packages/frontend/src/components/global/MkAvatar.vue @@ -1,11 +1,19 @@ @@ -110,32 +118,41 @@ watch(() => props.user.avatarBlurhash, () => { } .cat { - &:before, &:after { - background: #df548f; - border: solid 4px currentColor; - box-sizing: border-box; - content: ''; + > .earLeft, + > .earRight { + contain: strict; display: inline-block; height: 50%; width: 50%; + background: currentColor; + + &::before { + contain: strict; + content: ''; + display: block; + width: 60%; + height: 60%; + margin: 20%; + background: #df548f; + } } - &:before { + > .earLeft { border-radius: 0 75% 75%; transform: rotate(37.5deg) skew(30deg); } - &:after { + > .earRight { border-radius: 75% 0 75% 75%; transform: rotate(-37.5deg) skew(-30deg); } &:hover { - &:before { + > .earLeft { animation: earwiggleleft 1s infinite; } - &:after { + > .earRight { animation: earwiggleright 1s infinite; } }