mirror of
https://github.com/handsomezhuzhu/personal-navigation-site.git
synced 2026-04-18 22:32:52 +00:00
fix: resolve CSS animation conflicts with Tailwind v4
Remove conflicting 'tailwindcss-animate' and downgrade 'tw-animate-css' to compatible version. Manually add necessary animation utilities to globals.css. Co-authored-by: Simon <85533298+handsomezhuzhu@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
@import "tailwindcss";
|
||||
@import "tw-animate-css";
|
||||
|
||||
@custom-variant dark (&:is(.dark *));
|
||||
|
||||
@@ -153,3 +152,65 @@
|
||||
background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
|
||||
/* Animation utilities */
|
||||
@keyframes fade-in {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
@keyframes fade-out {
|
||||
from { opacity: 1; }
|
||||
to { opacity: 0; }
|
||||
}
|
||||
|
||||
@keyframes zoom-in-95 {
|
||||
from { opacity: 0; transform: scale(0.95); }
|
||||
to { opacity: 1; transform: scale(1); }
|
||||
}
|
||||
|
||||
@keyframes zoom-out-95 {
|
||||
from { opacity: 1; transform: scale(1); }
|
||||
to { opacity: 0; transform: scale(0.95); }
|
||||
}
|
||||
|
||||
@keyframes slide-in-from-top-2 {
|
||||
from { transform: translateY(-0.5rem); }
|
||||
to { transform: translateY(0); }
|
||||
}
|
||||
|
||||
@keyframes slide-in-from-bottom-2 {
|
||||
from { transform: translateY(0.5rem); }
|
||||
to { transform: translateY(0); }
|
||||
}
|
||||
|
||||
@keyframes slide-in-from-left-2 {
|
||||
from { transform: translateX(-0.5rem); }
|
||||
to { transform: translateX(0); }
|
||||
}
|
||||
|
||||
@keyframes slide-in-from-right-2 {
|
||||
from { transform: translateX(0.5rem); }
|
||||
to { transform: translateX(0); }
|
||||
}
|
||||
|
||||
.animate-in {
|
||||
animation-duration: 150ms;
|
||||
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
|
||||
.animate-out {
|
||||
animation-duration: 150ms;
|
||||
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
|
||||
.fade-in-0 { animation-name: fade-in; }
|
||||
.fade-out-0 { animation-name: fade-out; }
|
||||
.zoom-in-95 { animation-name: zoom-in-95; }
|
||||
.zoom-out-95 { animation-name: zoom-out-95; }
|
||||
.slide-in-from-top-2 { animation-name: slide-in-from-top-2; }
|
||||
.slide-in-from-bottom-2 { animation-name: slide-in-from-bottom-2; }
|
||||
.slide-in-from-left-2 { animation-name: slide-in-from-left-2; }
|
||||
.slide-in-from-right-2 { animation-name: slide-in-from-right-2; }
|
||||
|
||||
Reference in New Issue
Block a user