Add hover effect on ButtonCircle
This commit is contained in:
@@ -1,15 +1,76 @@
|
||||
.button-circle {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
background-color: #fff;
|
||||
background: #fff;
|
||||
border-radius: 100vh;
|
||||
transition: background-color 0.7s var(--ease-quart);
|
||||
|
||||
& > * {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
// Clones
|
||||
.clone {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
transform-origin: center center;
|
||||
transition: opacity 0.7s var(--ease-quart), transform 0.7s var(--ease-quart);
|
||||
|
||||
&:last-child {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 0;
|
||||
transform: translate3d(-100%, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Hover
|
||||
&:hover {
|
||||
.clone {
|
||||
&:first-child {
|
||||
opacity: 0;
|
||||
transform: scale(0.9) translate3d(30%, 0, 0);
|
||||
}
|
||||
&:last-child {
|
||||
opacity: 1;
|
||||
transform: translate3d(0,0,0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Variants
|
||||
*/
|
||||
// Small size
|
||||
&--small {
|
||||
height: 32px;
|
||||
width: 32px;
|
||||
|
||||
img, svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
|
||||
// Pink color
|
||||
&--pink {
|
||||
background-color: $color-secondary;
|
||||
|
||||
&:hover {
|
||||
background-color: darken($color-secondary, 7);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user