From 07323b2028691e703eac960d21f6b0de0e636206 Mon Sep 17 00:00:00 2001 From: dertyp7 Date: Sat, 13 Jan 2024 18:43:42 +0100 Subject: [PATCH] Refactor ScrollToTop.scss to add hover animation --- src/styles/ScrollToTop.scss | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/styles/ScrollToTop.scss b/src/styles/ScrollToTop.scss index 4d20a39..f63ae3f 100644 --- a/src/styles/ScrollToTop.scss +++ b/src/styles/ScrollToTop.scss @@ -11,23 +11,33 @@ transform: rotate(0deg); &:hover { - animation: pulseUp 1s infinite; + animation: pulseUp 1s 2; + } + + @media screen and (min-width: 768px) { + &:hover { + animation: pulseUp 1s infinite; + } } } &.down { transform: rotate(-180deg); + &:hover { + animation: pulseDown 1s 2; + } + @media screen and (min-width: 768px) { width: 50px; height: 50px; position: fixed; bottom: 15px; right: 50%; - } - &:hover { - animation: pulseDown 1s infinite; + &:hover { + animation: pulseDown 1s infinite; + } } } }