I am trying to create a button and I added a transition property to ease in the hover state. Everything is fine when I hover over it, but once I take the mouse off it, the arrow sudden goes back. Why isn’t it following the transition property?
Here is the code (SASS):
.primary-btn {
border: colors(col-dark-white) 0.2rem solid;
background: none;
color: colors(col-dark-white);
width: 16vw;
padding: 1.2rem;
margin-top: 7rem;
transition: all 0.5s;
.fas {
vertical-align: middle;
}
@include responsive(md) {
width: 20vw;
}
@include responsive(sm) {
width: 25vw;
}
&:hover {
cursor: pointer;
background: colors(col-dark-blue);
border: colors(col-dark-blue) 0.2rem solid;
.fas {
transition: all 0.5s;
transform: rotate(90deg);
}
}
}
Here is the HTML:
<a href="#"><button class="primary-btn h6" type="button">View More <i class="fas fa-angle-right"></i></button></a>