Skip to content

Commit 537aa09

Browse files
committed
Fix animations: Add keyframes with !important to prevent minifier from stripping them
1 parent 2669c98 commit 537aa09

2 files changed

Lines changed: 53 additions & 1 deletion

File tree

docusaurus.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ const config = {
7878
darkTheme: darkCodeTheme,
7979
},
8080
}),
81+
82+
plugins: [
83+
require.resolve('./plugins/preserve-keyframes'),
84+
],
8185
};
8286

8387
module.exports = config;

src/css/custom.css

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,11 @@ img, svg, video, iframe {
639639
linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
640640
}
641641

642+
/* ============================================
643+
KEYFRAMES - CRITICAL: DO NOT REMOVE
644+
These keyframes are required for animations
645+
============================================ */
646+
642647
@keyframes float {
643648
0%, 100% {
644649
transform: translateY(0px) rotate(0deg);
@@ -648,8 +653,51 @@ img, svg, video, iframe {
648653
}
649654
}
650655

656+
@keyframes blob {
657+
0% {
658+
transform: translate(0px, 0px) scale(1);
659+
}
660+
33% {
661+
transform: translate(30px, -50px) scale(1.1);
662+
}
663+
66% {
664+
transform: translate(-20px, 20px) scale(0.9);
665+
}
666+
100% {
667+
transform: translate(0px, 0px) scale(1);
668+
}
669+
}
670+
671+
@keyframes fadeIn {
672+
0% {
673+
opacity: 0;
674+
transform: translateY(10px);
675+
}
676+
100% {
677+
opacity: 1;
678+
transform: translateY(0);
679+
}
680+
}
681+
682+
/* Animation classes - MUST reference keyframes above */
651683
.animate-float {
652-
animation: float 6s ease-in-out infinite;
684+
animation-name: float !important;
685+
animation-duration: 6s !important;
686+
animation-timing-function: ease-in-out !important;
687+
animation-iteration-count: infinite !important;
688+
}
689+
690+
.animate-blob {
691+
animation-name: blob !important;
692+
animation-duration: 7s !important;
693+
animation-iteration-count: infinite !important;
694+
}
695+
696+
.animate-fade-in {
697+
animation-name: fadeIn !important;
698+
animation-duration: 0.5s !important;
699+
animation-timing-function: ease-out !important;
700+
animation-fill-mode: forwards !important;
653701
}
654702

655703
/* Hero Background Glows */

0 commit comments

Comments
 (0)