Skip to content

Commit 0535dfd

Browse files
committed
Optimize go page animation performance
1 parent f4e963d commit 0535dfd

1 file changed

Lines changed: 13 additions & 23 deletions

File tree

src/css/custom.css

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,8 +1251,9 @@ html.docs-wrapper .table-of-contents__link--active {
12511251
position: absolute;
12521252
display: block;
12531253
pointer-events: none;
1254-
mix-blend-mode: screen;
1255-
will-change: transform, opacity, background-position;
1254+
backface-visibility: hidden;
1255+
transform-origin: center;
1256+
will-change: transform, opacity;
12561257
}
12571258

12581259
.go-motion-orb {
@@ -1262,10 +1263,10 @@ html.docs-wrapper .table-of-contents__link--active {
12621263
height: min(86vw, 78rem);
12631264
border-radius: 44% 56% 48% 52%;
12641265
background:
1265-
conic-gradient(from 18deg at 54% 46%, transparent 0deg, rgba(255, 136, 44, 0.58) 38deg, rgba(255, 213, 161, 0.28) 76deg, transparent 118deg, rgba(130, 59, 20, 0.26) 182deg, transparent 242deg, rgba(242, 139, 50, 0.46) 310deg, transparent 360deg),
1266-
radial-gradient(circle at 28% 32%, rgba(255, 214, 160, 0.34), transparent 26%),
1267-
radial-gradient(circle at 72% 66%, rgba(185, 79, 25, 0.34), transparent 32%);
1268-
filter: blur(34px);
1266+
radial-gradient(ellipse at 28% 32%, rgba(255, 214, 160, 0.42), transparent 34%),
1267+
radial-gradient(ellipse at 72% 66%, rgba(185, 79, 25, 0.4), transparent 42%),
1268+
linear-gradient(126deg, transparent 0 22%, rgba(255, 136, 44, 0.42) 38%, rgba(255, 213, 161, 0.18) 48%, transparent 72% 100%);
1269+
filter: blur(18px);
12691270
opacity: 0.01;
12701271
transform: translate3d(-10%, -8%, 0) scale(0.78) rotate(0deg);
12711272
animation: go-orb-drift 10s linear infinite;
@@ -1284,7 +1285,7 @@ html.docs-wrapper .table-of-contents__link--active {
12841285
linear-gradient(72deg, transparent 0 28%, rgba(125, 61, 24, 0.32) 43%, rgba(255, 177, 95, 0.4) 56%, transparent 76% 100%);
12851286
background-size: 72% 92%, 68% 76%, 76% 88%, 112% 132%, 128% 146%;
12861287
background-position: -8% 54%, 18% 10%, 74% 82%, 0% 50%, 100% 42%;
1287-
filter: blur(22px);
1288+
filter: none;
12881289
opacity: 0.01;
12891290
transform: translate3d(-8%, 0, 0) rotate(-6deg) scale(1.12);
12901291
animation: go-wave-flow 6.5s linear infinite;
@@ -1297,10 +1298,10 @@ html.docs-wrapper .table-of-contents__link--active {
12971298
height: min(82vw, 68rem);
12981299
border-radius: 50%;
12991300
background:
1300-
conic-gradient(from 210deg at 46% 54%, transparent 0deg, rgba(255, 213, 161, 0.2) 38deg, rgba(242, 139, 50, 0.46) 82deg, transparent 126deg, rgba(93, 43, 16, 0.32) 188deg, transparent 242deg, rgba(255, 177, 95, 0.38) 304deg, transparent 360deg),
1301-
radial-gradient(ellipse at 34% 44%, rgba(255, 177, 95, 0.34), transparent 34%),
1302-
radial-gradient(ellipse at 72% 34%, rgba(255, 238, 210, 0.2), transparent 26%);
1303-
filter: blur(48px);
1301+
radial-gradient(ellipse at 34% 44%, rgba(255, 177, 95, 0.38), transparent 42%),
1302+
radial-gradient(ellipse at 72% 34%, rgba(255, 238, 210, 0.18), transparent 34%),
1303+
linear-gradient(42deg, transparent 0 18%, rgba(93, 43, 16, 0.24) 34%, rgba(242, 139, 50, 0.36) 52%, transparent 78% 100%);
1304+
filter: blur(14px);
13041305
opacity: 0.01;
13051306
transform: translate3d(6%, 12%, 0) scale(0.84) rotate(0deg);
13061307
animation: go-current-fold 11s linear infinite;
@@ -1315,7 +1316,7 @@ html.docs-wrapper .table-of-contents__link--active {
13151316
linear-gradient(115deg, transparent 0 28%, rgba(255, 177, 95, 0.18) 34%, transparent 42% 100%);
13161317
background-size: 190px 138px, 236px 172px, 280px 190px, 150% 150%;
13171318
background-position: 0 0, 42px 26px, 90px 40px, 10% 60%;
1318-
filter: blur(0.5px);
1319+
filter: none;
13191320
opacity: 0.01;
13201321
transform: translate3d(0, 0, 0) scale(1);
13211322
animation: go-ember-shear 4.8s linear infinite;
@@ -1793,32 +1794,26 @@ html.docs-wrapper .table-of-contents__link--active {
17931794
@keyframes go-wave-flow {
17941795
0%,
17951796
100% {
1796-
background-position: -8% 54%, 18% 10%, 74% 82%, 0% 50%, 100% 42%;
17971797
opacity: 0.01;
17981798
transform: translate3d(-8%, 0, 0) rotate(-6deg) scale(1.12);
17991799
}
18001800
10% {
1801-
background-position: 0% 48%, 28% 18%, 66% 72%, 18% 46%, 82% 50%;
18021801
opacity: 0.05;
18031802
transform: translate3d(-5%, -2%, 0) rotate(-3deg) scale(1.15);
18041803
}
18051804
24% {
1806-
background-position: 24% 34%, 46% 32%, 44% 64%, 48% 38%, 58% 58%;
18071805
opacity: 0.72;
18081806
transform: translate3d(5%, -6%, 0) rotate(4deg) scale(1.22);
18091807
}
18101808
43% {
1811-
background-position: 54% 48%, 68% 16%, 26% 76%, 82% 56%, 24% 42%;
18121809
opacity: 0.94;
18131810
transform: translate3d(11%, 5%, 0) rotate(-1deg) scale(1.3);
18141811
}
18151812
63% {
1816-
background-position: 76% 62%, 82% 44%, 58% 42%, 116% 64%, -4% 62%;
18171813
opacity: 0.64;
18181814
transform: translate3d(0, 11%, 0) rotate(6deg) scale(1.2);
18191815
}
18201816
84% {
1821-
background-position: 92% 52%, 94% 18%, 80% 70%, 142% 48%, -30% 48%;
18221817
opacity: 0.05;
18231818
transform: translate3d(-6%, 2%, 0) rotate(-3deg) scale(1.14);
18241819
}
@@ -1855,27 +1850,22 @@ html.docs-wrapper .table-of-contents__link--active {
18551850
@keyframes go-ember-shear {
18561851
0%,
18571852
100% {
1858-
background-position: 0 0, 42px 26px, 90px 40px, 10% 60%;
18591853
opacity: 0.01;
18601854
transform: translate3d(0, 0, 0) scale(1);
18611855
}
18621856
18% {
1863-
background-position: 44px 20px, 86px 54px, 132px 72px, 28% 48%;
18641857
opacity: 0.06;
18651858
transform: translate3d(1%, -1%, 0) scale(1.01);
18661859
}
18671860
34% {
1868-
background-position: 102px 52px, 150px 88px, 196px 106px, 64% 42%;
18691861
opacity: 0.3;
18701862
transform: translate3d(2%, -2%, 0) scale(1.02);
18711863
}
18721864
55% {
1873-
background-position: 176px 94px, 230px 138px, 288px 152px, 92% 58%;
18741865
opacity: 0.18;
18751866
transform: translate3d(-1%, 1%, 0) scale(1.01);
18761867
}
18771868
76% {
1878-
background-position: 230px 132px, 302px 188px, 354px 204px, 126% 52%;
18791869
opacity: 0.05;
18801870
transform: translate3d(0, 0, 0) scale(1);
18811871
}

0 commit comments

Comments
 (0)