From 8fc4f03754ed773976e9bb9becfce47339bc480d Mon Sep 17 00:00:00 2001
From: Olivia206 <olivia.simonet@mmibordeaux.com>
Date: Mon, 15 May 2023 15:46:07 +0200
Subject: [PATCH] added hover effect to cta button

---
 assets/sass/_theme/_configuration.sass        | 2 ++
 assets/sass/_theme/blocks/call_to_action.sass | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/assets/sass/_theme/_configuration.sass b/assets/sass/_theme/_configuration.sass
index 1336740c..a8c279d4 100644
--- a/assets/sass/_theme/_configuration.sass
+++ b/assets/sass/_theme/_configuration.sass
@@ -270,6 +270,8 @@ $block-call-to-action-background: $color-accent !default
 $block-call-to-action-color: $color-background !default
 $block-call-to-action-button-background: $color-background !default
 $block-call-to-action-button-color: $color-text !default
+$block-call-to-action-button-hover-background: $color-text-alt !default
+$block-call-to-action-button-hover-color: white !default
 
 // Block chapter
 $block-chapter-layout-accent-background: $color-accent !default
diff --git a/assets/sass/_theme/blocks/call_to_action.sass b/assets/sass/_theme/blocks/call_to_action.sass
index f06a53ec..32f2f4d9 100644
--- a/assets/sass/_theme/blocks/call_to_action.sass
+++ b/assets/sass/_theme/blocks/call_to_action.sass
@@ -30,6 +30,12 @@
                     @include btn
                     background: $block-call-to-action-button-background
                     color: $block-call-to-action-button-color
+                    transition: background .3s ease, color .3s ease
+                    &:hover,
+                    &:focus-visible,
+                    &:focus
+                        background: $block-call-to-action-button-hover-background
+                        color: $block-call-to-action-button-hover-color
                 &:last-child
                     margin-bottom: 0
         * + .actions
-- 
GitLab