From 18ac4f9fbbe70f190d7a982d2575c5abecfad137 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 23 Sep 2022 17:03:40 +0100 Subject: [PATCH] Animate hover on shareon icons --- static/src/scss/_shareon.scss | 8 ++++++++ static/src/scss/_variables.scss | 1 + static/src/scss/base.scss | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/static/src/scss/_shareon.scss b/static/src/scss/_shareon.scss index 90c4054..83d0012 100644 --- a/static/src/scss/_shareon.scss +++ b/static/src/scss/_shareon.scss @@ -1,3 +1,11 @@ .shareon-container { margin-top: 1rem; + + .shareon { + & > a, + & > button { + transition-property: opacity; + transition-duration: $link-hover-duration; + } + } } diff --git a/static/src/scss/_variables.scss b/static/src/scss/_variables.scss index 0f1627e..19a8cbb 100644 --- a/static/src/scss/_variables.scss +++ b/static/src/scss/_variables.scss @@ -1,2 +1,3 @@ $dark-mode-background: $dark; $dark-mode-text: $grey-lighter; +$link-hover-duration: 0.25s; diff --git a/static/src/scss/base.scss b/static/src/scss/base.scss index 8069e6e..8c8cfc0 100644 --- a/static/src/scss/base.scss +++ b/static/src/scss/base.scss @@ -40,7 +40,7 @@ main { a { transition-property: color, background-color; - transition-duration: 0.25s !important; + transition-duration: $link-hover-duration !important; @include dark-mode { &:hover {