All checks were successful
continuous-integration/drone/push Build is passing
270 lines
5.8 KiB
SCSS
270 lines
5.8 KiB
SCSS
// Button: Control
|
|
.button-control {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 40px;
|
|
height: 40px;
|
|
overflow: hidden;
|
|
padding-top: 2px;
|
|
pointer-events: auto;
|
|
border-radius: 100%;
|
|
border: none;
|
|
cursor: pointer;
|
|
outline: none;
|
|
transition: background-color 350ms $ease-quart;
|
|
will-change: transform, opacity;
|
|
|
|
@include breakpoint (sm) {
|
|
width: 56px;
|
|
height: 56px;
|
|
}
|
|
|
|
// Icon
|
|
.icon {
|
|
overflow: hidden;
|
|
display: block;
|
|
width: 13px;
|
|
height: auto;
|
|
transition: transform 500ms $ease-quart, opacity 150ms $ease-inout;
|
|
will-change: transform;
|
|
|
|
@include breakpoint (sm) {
|
|
width: 20px;
|
|
}
|
|
}
|
|
.icon[aria-hidden] {
|
|
opacity: 0;
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
}
|
|
|
|
|
|
/*
|
|
** Variants
|
|
*/
|
|
&--white {
|
|
background-color: #fff;
|
|
|
|
&:hover, &.hover {
|
|
background-color: $color-secondary;
|
|
}
|
|
}
|
|
&--pink {
|
|
background-color: rgba($color-secondary, 0.4);
|
|
|
|
&:hover, &.hover {
|
|
background-color: rgba($color-secondary, 0.75);
|
|
}
|
|
}
|
|
&--gray {
|
|
background-color: $color-gray;
|
|
|
|
&:hover, &.hover {
|
|
background-color: $color-text;
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
** Effects
|
|
*/
|
|
&--shadow {
|
|
box-shadow: 0 0 10px rgba(#000, 0.4);
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
** Directions
|
|
*/
|
|
// To left
|
|
&.dir-left {
|
|
.icon[aria-hidden] {
|
|
transform: translate(100%, -50%);
|
|
}
|
|
|
|
&:hover, &.hover {
|
|
.icon:not([aria-hidden]) {
|
|
opacity: 0;
|
|
transform: translate(-100%, 0);
|
|
}
|
|
.icon[aria-hidden] {
|
|
opacity: 1;
|
|
transform: translate(-50%, -50%);
|
|
}
|
|
}
|
|
}
|
|
// To right
|
|
&.dir-right {
|
|
.icon[aria-hidden] {
|
|
transform: translate(-150%, -50%);
|
|
}
|
|
|
|
&:hover, &.hover {
|
|
.icon:not([aria-hidden]) {
|
|
opacity: 0;
|
|
transform: translate(100%, 0);
|
|
}
|
|
.icon[aria-hidden] {
|
|
opacity: 1;
|
|
transform: translate(-50%, -50%);
|
|
}
|
|
}
|
|
}
|
|
// From top
|
|
&.dir-top {
|
|
.icon[aria-hidden] {
|
|
left: auto;
|
|
transform: translate(0, -150%);
|
|
}
|
|
|
|
&:hover, &.hover {
|
|
.icon:not([aria-hidden]) {
|
|
opacity: 0;
|
|
transform: translate(0, 100%);
|
|
}
|
|
.icon[aria-hidden] {
|
|
opacity: 1;
|
|
transform: translate(0, -50%);
|
|
}
|
|
}
|
|
}
|
|
// From bottom
|
|
&.dir-bottom {
|
|
.icon[aria-hidden] {
|
|
left: auto;
|
|
transform: translate(0, 150%);
|
|
}
|
|
|
|
&:hover, &.hover {
|
|
.icon:not([aria-hidden]) {
|
|
opacity: 0;
|
|
transform: translate(0, -100%);
|
|
}
|
|
.icon[aria-hidden] {
|
|
opacity: 1;
|
|
transform: translate(0, -50%);
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
** Dashed style
|
|
*/
|
|
&--dashed {
|
|
position: relative;
|
|
overflow: visible;
|
|
background-color: rgba($color-lightpurple, 0.5);
|
|
transition: background-color 150ms $ease-inout;
|
|
will-change: transform, opacity;
|
|
|
|
// Icon
|
|
svg[fill] {
|
|
height: auto;
|
|
}
|
|
|
|
// Dashed circle
|
|
svg:not([fill]) {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
width: 130%;
|
|
height: 130%;
|
|
transform: translate(-50%, -50%);
|
|
}
|
|
circle {
|
|
display: block;
|
|
stroke-width: 1.75;
|
|
stroke-dasharray: 7, 3;
|
|
stroke: rgba($color-lightpurple, 0.35);
|
|
fill: none;
|
|
transform-origin: 50% 50%;
|
|
animation: rotateDashes 5s linear infinite;
|
|
animation-play-state: paused;
|
|
animation-delay: 50ms;
|
|
transition: stroke 150ms $ease-inout;
|
|
will-change: stroke;
|
|
}
|
|
|
|
// Hover
|
|
&:hover, &:focus {
|
|
background-color: rgba($color-lightpurple, 0.65);
|
|
|
|
* {
|
|
animation-play-state: running;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
** Big version
|
|
*/
|
|
&--big {
|
|
width: 88px;
|
|
height: 88px;
|
|
text-decoration: none;
|
|
|
|
@include breakpoint (sm) {
|
|
width: 120px;
|
|
height: 120px;
|
|
}
|
|
@include breakpoint (lg) {
|
|
width: 152px;
|
|
height: 152px;
|
|
}
|
|
|
|
.center {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
|
|
span {
|
|
display: block;
|
|
margin-top: 8px;
|
|
color: rgba(#fff, 0.3);
|
|
text-transform: uppercase;
|
|
font-family: $font-sans-sb;
|
|
font-size: rem(8px);
|
|
letter-spacing: 1px;
|
|
line-height: 1;
|
|
|
|
@include breakpoint (sm) {
|
|
margin-top: 10px;
|
|
font-size: rem(10px);
|
|
}
|
|
}
|
|
}
|
|
|
|
img {
|
|
display: block;
|
|
width: 24px;
|
|
|
|
@include breakpoint (sm) {
|
|
width: 40px;
|
|
}
|
|
}
|
|
|
|
// Big Dashed
|
|
&.button-control--dashed {
|
|
// Icon
|
|
svg[fill] {
|
|
@include breakpoint (xs) {
|
|
width: 28px;
|
|
}
|
|
}
|
|
// Circle
|
|
circle {
|
|
@include breakpoint (sm) {
|
|
stroke-width: 4.5;
|
|
stroke-dasharray: 20, 8;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|