From ecbf5f96ebfd346bff2f45cfd5e0e7c66862312c Mon Sep 17 00:00:00 2001 From: daudix Date: Sat, 30 Mar 2024 22:27:43 +0300 Subject: [PATCH] Spin boosts/faves icon on hover (more fun!) --- sass/_comments.scss | 5 +++++ templates/partials/comments.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sass/_comments.scss b/sass/_comments.scss index 4f8acae..51286c8 100644 --- a/sass/_comments.scss +++ b/sass/_comments.scss @@ -142,12 +142,17 @@ section#comments { svg { margin-inline-end: 0.25rem; + transition: var(--transition-long); vertical-align: -0.125em; } &:hover { box-shadow: var(--edge-highlight); text-decoration: none; + + svg { + rotate: 360deg; + } } &:active { diff --git a/templates/partials/comments.html b/templates/partials/comments.html index d111ea6..d5d34cd 100644 --- a/templates/partials/comments.html +++ b/templates/partials/comments.html @@ -211,7 +211,7 @@ boosts.className = "boosts"; boosts.setAttribute("href", `${status.url}/reblogs`); boosts.setAttribute("title", `Favorites from ${instance}`); - + let boostsIcon = document.createElementNS("http://www.w3.org/2000/svg", "svg"); boostsIcon.setAttribute("xmlns", "http://www.w3.org/2000/svg"); boostsIcon.setAttribute("width", "16");