Skip to content

Instantly share code, notes, and snippets.

@cormac-work
Last active October 25, 2017 08:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cormac-work/0fe8265619e4b72421e9191efcd6c248 to your computer and use it in GitHub Desktop.
Save cormac-work/0fe8265619e4b72421e9191efcd6c248 to your computer and use it in GitHub Desktop.
Icon adapt bounce and color hover effect
.component {
.component-icon-holder {
/*reduced width to 10%*/
width: 10%;
float: left;
margin-right: 18px;
&.right {
float: right;
}
.component-icon {
&.icon {
/*changed size to 48px*/
font-size: 48px;
/*changed icon color from grey to primary color*/
color: @primary-color;
}
/*added hover effect*/
.no-touch &:hover {
color: lighten(@primary-color, 25%);
transition: all 0.5s ease;
/*added skew effect
/*transform: skew(-10deg);*/
/*added bounce effect*/
animation: bounce 1s;
/*bounce effect setup*/
@keyframes bounce {
0%, 20%, 60%, 100% {
-webkit-transform: translateY(0);
transform: translateY(0);
}
40% {
-webkit-transform: translateY(-20px);
transform: translateY(-20px);
}
80% {
-webkit-transform: translateY(-10px);
transform: translateY(-10px);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment