⚠️ Fix most animations/transitions performance issues
All checks were successful
continuous-integration/drone/push Build is passing

- Basically add `will-change` to CSS elements to enable GPU animations, less choppy, more sassy
- Use requestAnimationFrame over setTimeout
- Avoid repaints AMAP
This commit is contained in:
2020-04-05 16:07:44 +02:00
parent 0b8086e63c
commit bd9b91f480
21 changed files with 129 additions and 89 deletions

View File

@@ -59,7 +59,6 @@ button {
letter-spacing: -2vw;
pointer-events: none;
user-select: none;
will-change: transform;
@include breakpoint (lg) {
font-size: pxVW(700);
@@ -67,6 +66,10 @@ button {
@include breakpoint (1920px) {
font-size: rem(900px);
}
&, span {
will-change: transform, opacity;
}
}
@@ -109,6 +112,9 @@ button {
margin-right: -8px;
}
}
span, em {
will-change: transform;
}
// Bigger version
&--big {
@@ -189,7 +195,7 @@ button {
.style-caps {
font-family: $font-sans;
font-size: rem(14px);
font-size: rem(12px);
color: $color-tertiary;
text-transform: uppercase;
letter-spacing: 1px;
@@ -198,6 +204,10 @@ button {
&--transparent {
color: rgba($color-tertiary, 0.5);
}
@include breakpoint (sm) {
font-size: rem(14px);
}
}
.style-description {