will-change is apparently not enough to run GPU-enabled animations, use translateZ on top of it
90 lines
1.8 KiB
SCSS
90 lines
1.8 KiB
SCSS
// Location
|
|
.location {
|
|
position: relative;
|
|
margin-bottom: 48px;
|
|
|
|
@include breakpoint (sm) {
|
|
margin-left: pxVW(72);
|
|
margin-right: pxVW(72);
|
|
}
|
|
@include breakpoint (xl) {
|
|
margin-left: 72px;
|
|
margin-right: 72px;
|
|
}
|
|
|
|
&, a * {
|
|
will-change: transform, opacity;
|
|
}
|
|
|
|
a {
|
|
position: relative;
|
|
z-index: 2;
|
|
display: flex;
|
|
flex-flow: column;
|
|
align-items: center;
|
|
text-decoration: none;
|
|
}
|
|
|
|
// Flag image
|
|
img {
|
|
display: block;
|
|
width: 32px;
|
|
height: auto;
|
|
margin: 0 auto;
|
|
border-radius: 100%;
|
|
}
|
|
|
|
// City
|
|
&__city {
|
|
font-family: $font-serif;
|
|
font-size: rem(32px);
|
|
color: $color-secondary;
|
|
|
|
@include breakpoint (md) {
|
|
font-size: rem(48px);
|
|
}
|
|
}
|
|
.mask-city {
|
|
height: 40px;
|
|
margin: 24px 0 16px;
|
|
|
|
@include breakpoint (md) {
|
|
height: 64px;
|
|
margin-bottom: 24px;
|
|
}
|
|
}
|
|
.mask-country {
|
|
height: 16px;
|
|
}
|
|
|
|
// Hover
|
|
&:hover {
|
|
.location__city {
|
|
color: $color-tertiary;
|
|
}
|
|
|
|
&:after {
|
|
opacity: 1;
|
|
transform: scale(1) translate(-50%, -50%);
|
|
}
|
|
}
|
|
|
|
// Shape on hover
|
|
&:after {
|
|
content: "";
|
|
pointer-events: none;
|
|
opacity: 0;
|
|
position: absolute;
|
|
z-index: 1;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%) scale(0.94);
|
|
display: block;
|
|
width: 216px;
|
|
height: 216px;
|
|
background: rgba($color-lightpurple, 0.3);
|
|
border-radius: 100%;
|
|
transition: all 85ms ease-in-out;
|
|
}
|
|
}
|