Skip to content

Commit

Permalink
Merge pull request #630 from mbao01/button-hover-effect
Browse files Browse the repository at this point in the history
Closes #452 - button hover effect transition
  • Loading branch information
imolorhe committed Mar 13, 2019
2 parents e1d8e5c + e428bfd commit 8caa07c
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/scss/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,26 @@ button{
&.active-primary{
background: var(--green-color);
color: var(--white-color);
&:hover{
// TODO: Figure out how to transition CSS gradients for the button hover effect
position: relative;
z-index: 1;

&::before {
background-image: linear-gradient(
rgba(255,255,255,0.2),
rgba(255,255,255,0.2)
);
content: "";
height: 100%;
left: 0;
opacity: 0;
position: absolute;
top: 0;
transition: opacity 0.4s;
width: 100%;
z-index: -1;
}
&:hover::before {
opacity: 1;
}
}
}
Expand Down

0 comments on commit 8caa07c

Please sign in to comment.