From 7fde6a93cf183e7f3a710a2fe23a5f5a4ccffa49 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Sun, 14 Apr 2024 00:01:09 -0700
Subject: feat(badges): darken hidden badges

---
 src/lib/FallbackBadge.svelte | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'src/lib/FallbackBadge.svelte')

diff --git a/src/lib/FallbackBadge.svelte b/src/lib/FallbackBadge.svelte
index 652c8735..470f5d8c 100644
--- a/src/lib/FallbackBadge.svelte
+++ b/src/lib/FallbackBadge.svelte
@@ -12,6 +12,7 @@
 	export let error = 'https://i2.kym-cdn.com/photos/images/newsfeed/000/290/992/0aa.jpg';
 	export let hideOnError = false;
 	export let badge: Badge;
+	export let style = '';
 
 	let replaceCount = 0;
 	let badgeReference: HTMLImageElement;
@@ -63,7 +64,8 @@
 			bind:this={badgeReference}
 			on:mousemove={handleMouseMove}
 			on:mouseleave={handleMouseLeave}
-			style="transform: perspective(1000px) rotateX({mouseY / 10}deg) rotateY({-mouseX / 10}deg);"
+			style="transform: perspective(1000px) rotateX({mouseY / 10}deg) rotateY({-mouseX /
+				10}deg); ${style}"
 			on:error={(e) => delayedReplace(e, fallback)}
 		/>
 	</a>
-- 
cgit v1.2.3

